BookmarkSubscribeRSS Feed
spscmorr
Calcite | Level 5
Dear List,

I want to use PROC MIXED to assess the effect of an intervention on an outcome variable.The model will have two independent predictors/factors: trial (2 levels) and time (3 levels). All subjects (n=8) completed both trials.

In order to determine the appropriate covariance type for the model I want to start by running PROC MIXED with an unstructured covariance. However, I receive the following error: An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Subject 1.. There is no error regarding the data file (i.e., no subject has the a condition/time point represented twice). The model runs fine if I use compound symmetry. Below is the syntax that I have used:

proc mixed data=Workrate;
class Subject Trial Time;
model Watts=Trial Time Trial*Time;
repeated Time / subject=Subject type=un r rcorr;
run;

Any help regarding this problem will be greatly appreciated.
3 REPLIES 3
Dale
Pyrite | Level 9
A little more detail about the experimental design would help. But my guess is that since each subject completes both trials, then each subject probably has a time=1 value for trial 1 as well as a time=1 value for trial 2. If that is correct, then you have two time=1 values (as well as two time=2 values and two time=0 or two time=3 values) for each subject. This will produce the infinite likelihood error.

In order to produce the 6x6 unstructured covariance structure in which the first three rows of the covariance matrix represent the residual variance structure for trial 1 at the three time points and the last three rows of the covariance matrix represent the residual variance structure for trial 2 over the three time points, you can change your REPEATED statement to:

repeated trial*time / subject=subject type=un r rcorr;

But maybe you are thinking of an R matrix which assumes that the residuals for trials 1 and 2 are independent of one another, and that the covariance over time within each of the two trials is the same. In order to fit that model, you would specify:

repeated time / subject=subject*trial type=un r rcorr;

With each subject producing a response for each of the two trials, you should have employed a cross-over design for your experiment. I don't see anything in your model which accounts for period effects that would indicate whether trial 1 was administered first or trial 2 was administered first. So, either your experimental design has a severe shortcoming, or your model of the fixed effects is not appropriately specified.

HTH
spscmorr
Calcite | Level 5
Many thanks for the response Dale. I think you have solved my problem.

You are correct, each subject does have a time=1 value for trial as well as a time=1 value for trial 2.

I did indeed conduct a cross-over design. The order of the trials was counterbalanced and a long enough washout period occurred between trials. Thus, I did not think that the period effect needed to be included into the model. Do you agree with this? Very interested in your view on this.
Dale
Pyrite | Level 9
It is only an assumption on your part that your washout period is sufficient. This assumption should be examined.

I would advise that you examine whether there are differential mean values for trial 1 at time t depending on whether trial 1 was the first experimental treatment that the subject received or whether trial 1 was the second experimental treatment. Obviously, you would want to do the same for trial 2. And, while you are at it, you might just as well look at the difference between trial 1 and trial 2 for the two different presentation orders. If there are no differences in any of these effects, then you can ignore the period effects. But I wouldn't just assume that you can ignore the period effects.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 10359 views
  • 2 likes
  • 2 in conversation