BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Shah_Biostat
Fluorite | Level 6

I am analyzing data from animal experiments. Each experiment includes a response variable (continuous),  group {A, B}, condition(X, Y, Z}. The same experiment is replicated multiple times (5 times in this dataset) to ensure reproducibility. I want the model to account for the variability between replicates. The experiment-specific estimates are NOT my interest. I am using it as a blocking variable. I initially used it as a random effect to account for the fact that group effects can vary across different experiments. Then, I included the experiment as a fixed effect in addition to the random effect, which improves the model tremendously (the covariance parameter estimates were reduced from 20.6 to 5.8, And the AIC for the model was reduced from 703 to 676. Consequently, the confidence intervals for LS-means estimates were tighter when the experiment was included as a fixed effect as well as a random effect.

 

My question: Is it okay to include the 'experiment' variable in the model this way? Here is my code:

 

proc mixed data=lumi maxiter=1000 covtest;

class group(ref="flox")  experiment condition (ref="Basal");

model value = group|condition experiment/solution outpred=check;

random  group/ subject=experiment g v vcorr;

lsmeans group*condition/cl slice=condition pdiff=control('flox' 'Basal') adjust=dunnett;

run;

 

Any insight would be much appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

I think here 'experiment ' is just like subject_id variable in classical MIXED model.
You should NOT include subject_id in MODEL , since it is stands for a cluster/strata for mixed effect.
You should remove it from MODEL statement . Like:

model value = group|condition experiment/solution outpred=check;

random  group/ subject=experiment g v vcorr;
---->
model value = group|condition /solution outpred=check;

random  int  group/ subject=experiment g v vcorr;

View solution in original post

2 REPLIES 2
Ksharp
Super User

I think here 'experiment ' is just like subject_id variable in classical MIXED model.
You should NOT include subject_id in MODEL , since it is stands for a cluster/strata for mixed effect.
You should remove it from MODEL statement . Like:

model value = group|condition experiment/solution outpred=check;

random  group/ subject=experiment g v vcorr;
---->
model value = group|condition /solution outpred=check;

random  int  group/ subject=experiment g v vcorr;

Shah_Biostat
Fluorite | Level 6

Thanks so much, @Ksharp, for your response. Very helpful! 

I re-ran the model as you suggested, and covariance parameter estimates make more sense now!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 327 views
  • 3 likes
  • 2 in conversation