BookmarkSubscribeRSS Feed
Alan68022
Fluorite | Level 6

Hi! I have a split plot with two factors in the split. I need to know how to write the repeated statement for the residuals in the model. I have two treatments (active vs placebo). Patients are nested within treatment. The whole plot is
treatment (t-1)=1 df
patient(treatment) t*(p-1)=2p-2 df which is the random effect residual for the whole plot effect of treatment.
The split plot has factors week and segment. We are measuring 112 segments within patients' eyes at several timepoints (week variable). Each eye is divided up on scans into 56 parts. Everyone's eyes are divided the same way. At first I thought this was subsampling of the patient for examining the effect of treatment. But there is no randomization of segments being sampled and they are exactly the same across all patients. So, we have patients being blocks for both week and segment. The effects in the split plot are
week (w-1) df
treatment*week (t-1)(w-1) df
segment (s-1) df
treatment*segment (t-1)(s-1)
treatment*segment*week (t-1)(s-1)(w-1)
and the residual error term
The error term seems to be segment*patient(treatment) + week*patient(treatment) + segment*week*patient(treatment).
We have no interest in the segment effect. We are interested in treatment and week and treatment*week effects.
I believe the proc mixed call would have the following two random statements which assume a common variance between the two treatments.
Random patient(treatment);
Random week*patient(treatment);
What would the proc mixed repeated statement be for defining the residual error?
Thank you for your help!
Alan

4 REPLIES 4
StatsMan
SAS Super FREQ

The RANDOM statement

random patient(treatment);

correlates all the observations from the same patient with a CS structure. 

The RANDOM statement

random week*patient(treatment);

correlates all the observations from the same week for a patient. So that statement puts a CS structure on all the segments from the same week on the same patient. 

From your description, you may not need to further correlate the errors in your model. You state that segment is of no interest to you, so you do not need an effect that includes segment. It does appear that you are measuring both eyes on a patient, with 56 observations coming from each eye. If both, do you need to correlate observations from the same eye?

You could correlate the observations from the same segment across the weeks, using something like segment*eye*patient(treatment) as the subject effect on a REPEATED statement. That might look something like

repeated week / subject=segment*eye*patient(treatment) type=??; 

where you can choose the covariance structure applied. This model will get expensive to estimate if you have lots of patients and many weeks, however. 

Alan68022
Fluorite | Level 6

Thanks StatsMan for your help! I also checked with George Milliken from KSU and who cowrote the SAS book on mixed models. He explained to me that I could use:

repeated week*segment / subject=segment*eye*patient(treatment) type=??; 

 I didn't know that by putting week*segment in this repeated statement that it would automatically include all three: segment*patient(treatment) + week*patient(treatment) + segment*week*patient(treatment). Unfortunately, can't get it to converge. Still working on it. 

Thanks again!

StatsMan
SAS Super FREQ

Try using just WEEK as the repeated effect (the term after the REPEATED statement) and see if that will converge. I am not sure what MIXED will do if you include SEGMENT as both part of the repeated effect and the subject effect. You can try specifying the R option to see how MIXED is correlating the errors in your data.

Alan68022
Fluorite | Level 6

Sorry to not respond earlier. I tried your solution as well as the one I mentioned. The algorithm didn't converge with either one of them. I don't think I have enough observations to be able to use the model. I hope to have another opportunity to dive into this again, but with less sparse data. Thanks for your help statsman!

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 648 views
  • 0 likes
  • 2 in conversation