Hi there.
Could I please ask if someone could shed some light on this repeated measures question whether I'm doing it right?
My dataset has 3 variables of interest.
1) Intervention: A, B, C and D
2) ExperimentNo: 1,2,3 and 4
3) Concentration: the dependent variable
There are different numbers of Concentration for each pair of Intervention*ExperimentNo i.e. A1 has 300, B1 has 500, C4 has 150 etc. I'm interested in comparing the effect of Intervention.
I read the Clustered Data Example in the SAS Help & Documentation and tried the below model but it didn't converge which I don't understand why. I was thinking to take into account the concentration measurements from the same Intervention as well as those from the same level of Intervention*ExperimentNo.
proc mixed data=tmp order=internal;
class Intervention ExperimentNo:
model Concentration=Intervention / solution;
random Intervention Intervention*ExperimentNo: ;
run;
Whereas, this one below runs with no problem.
proc mixed data=tmp order=internal;
class Intervention experimentNum;
model Concentration=Intervention / solution;
random Intervention*ExperimentNo: ;
lsmeans Intervention / cl e om pdiff=control('A');
run;
Your insight is greatly appreciated! Have a good day.
Even though the latter may run, I don't think it is doing what you think it may be. The CLASS variable is 'experimentNum' while what is in the random statement is 'ExperimentNo'.
Try the following:
proc mixed data=tmp order=internal;
class Intervention experimentNo subjectid;
model Concentration=Intervention ExperimentNo Intervention*ExperimentNo / solution;
repeated ExperimentNo/type=cs subject=subjectid(Intervention): ;
lsmeans Intervention /diff=contro('A');
slice Intervention*ExperimentNo/ sliceby=ExperimentNo diff=control('A') ;
run;
Note the addition of subjectid. This should be available as the subject progresses from experiment 1 to 2 to 3 to 4. Now if there is no subject that does this, we need to recast the analysis.
Let us know if this works for your design.
Steve Denham
Hi Steve. Thanks so much for your reply.
Unfortunately, there isn't subjectid or any sort. That experimentNum/experimentNo was a typo for the last model, my apology. It was meant to be experimentNo. Would you think the second model ok for interpretation in my case?
Much appreciated!! Have a nice day!
That model ought to be interpretable.
Steve Denham
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!
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.