Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- multivariate crossover with proc mixed

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-08-2011 11:57 AM

Dear SAS users,

I have been trying to use proc mixed to analyze multivariate crossover data and have been running into a few problems. My dataset takes on the following form for subject 1.

Obs id seq period time trt conc

1 1 1 1 1 A 2.23904

2 1 1 1 2 A 2.78095

3 1 1 1 3 A 2.81751

4 1 1 1 4 A 3.08490

5 1 1 1 5 A 2.33377

6 1 1 1 6 A 1.40250

7 1 1 2 1 B 2.19885

8 1 1 2 2 B 3.41063

9 1 1 2 3 B 3.83306

10 1 1 2 4 B 4.07705

11 1 1 2 5 B 3.33320

12 1 1 2 6 B 2.87953

I would like to model the within-subject variances using kronecker products and the code I have been using to analyze this data set is as follows.

proc mixed data=mydata;

class id period trt time;

model conc=period trt time trt*time /solution noint ddfm=kr;

repeated period time/type=un@un subject=id r;

run;

It keeps giving me the error "WARNING: Stopped because of infinite likelihood." I realize after reading the SAS manual that this is because the same subject has the same value for the repeated factors. The error disappears when I add a sequence effect in the model, but my study does not call for its inclusion. It is also a little puzzling that if I use time first and then period, i.e. "repeated time period/type = un@un subject = id r", there are no errors!! Further, this error does not exist when I use un@cs or un@AR(1). Why is this and is there any other way that I could model the within subject variabilites using kronecker products?

Thank you in advance for your suggestions and time.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-09-2011 12:36 PM

You might try changing your repeated statement to the following:

repeated period time / type=un@un subject=id*trt r;

Another approach would be to remove period entirely as an effect, and recode time as 1 thru 12. If you are truly interested in period means, they could then be constructed from estimate or lsmestimate statements. The draw back to this approach is that you now must estimate 66 covariance parameters, rather than 30 with the un@un syntax.

Yet another approach might be:

repeated time / type=un subject=id*trt **group=period** r;

which should give block diagonal estimates in the covariance matrix, blocked by period.

Good luck.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-09-2011 01:51 PM

Thank you for your reply Steve. I tried changing my repeated statement to "repeated period time / type=un@un subject=id*trt r", but it still gives me the infinite likelihood error.

I do realize that there multiple ways to model this dataset like using random effects etc. But I simulated the covariance structures for my data using the kronecker product and would like to fit the "true" model to compare it with other approaches. Moreover, I am really curious as to why this does not work when using UN@UN, but works fine for UN@CS or UN@AR(1). It also seems to work without any errors when the number of time points are limited to 4 instead of 6.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-10-2011 08:44 AM

Hmm. I now wonder if there is something unusual in the particular dataset you are analyzing. You say that you simulated the covariance structures--do you have distinctly different datasets so you could find out if this occurs for all the datasets.

And I have a truly bizarre approach, if the compound symmetry and autoregressive products are working and the unstructured by unstructured is not. Try scrambling the dataset, so that it is NOT sorted. I know that sounds completely counterintuitive, but we recently had a similar problem (although not with a doubly repeated measures design) that we were able to solve by doing this--we got a heterogeneous compound symmetry model to converge and have appropriate behavior with the Hessian matrix by randomizing the dataset. I believe it all has something to do with the initial steps of the sweep operator in inverting X'VX, but I really am guessing.

The reduction to 4 time points really puzzles me, unless there are not enough observations to estimate under the 6 time points,

I will be watching to see if someone else has an idea.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-10-2011 10:33 AM

Thank you for your reply Steve. I too suspected that maybe it might be data from just that single iteration that caused the problem. So I tried it for 10 simulated datasets and it produces errors for 5/10. Amazingly, scrambling did work for some datasets, but 2/10 still produced infinite likelihood errors. Hopefully someone else might have come across this problem and may have a solution. I have attached the data here just in case someone likes to play with datasets like these.