BookmarkSubscribeRSS Feed
rach
Calcite | Level 5

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.

4 REPLIES 4
SteveDenham
Jade | Level 19

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

rach
Calcite | Level 5

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.

SteveDenham
Jade | Level 19

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

rach
Calcite | Level 5

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1036 views
  • 0 likes
  • 2 in conversation