BookmarkSubscribeRSS Feed
Shah_Islam
Calcite | Level 5

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 REPLY 1
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;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 1 reply
  • 83 views
  • 0 likes
  • 2 in conversation