Programming the statistical procedures from SAS

PROC MIXED - Repeated Measures - Unstructured Covariance

Reply
New Contributor
Posts: 2

PROC MIXED - Repeated Measures - Unstructured Covariance

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.
Regular Contributor
Posts: 169

Re: PROC MIXED - Repeated Measures - Unstructured Covariance

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
New Contributor
Posts: 2

Re: PROC MIXED - Repeated Measures - Unstructured Covariance

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.
Regular Contributor
Posts: 169

Re: PROC MIXED - Repeated Measures - Unstructured Covariance

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.
Ask a Question
Discussion stats
  • 3 replies
  • 2662 views
  • 2 likes
  • 2 in conversation