BookmarkSubscribeRSS Feed
DG1979
Calcite | Level 5

Question 1: My project involves 2 x 2 factorial design where animals were either subjected to treatment A or B and drug C or D. Each treatment combination was housed in 4 different feedlot pens (AC=pen 1; AD=pen 2; BC=pen 3; BD= pen 4). All animals belonged to the same breed, sex, and age and were managed in similar way. Measurements were taken in seven repeated days (day 7, 21, 28, 35, 56, and 57) post-treatment and drug administration. Animal is my experimental unit and the variable response (individual body weight; BW) followed the ANOVA criteria. Is the model below correct?

 

proc mixed data= XX;

class animal treatment drug day;

model BW = treatment|drug|day initial BW ddfm=kr;

random intercept / subject = animal;

repeated days / subject = animal type = cs;

lsmeans trt|drug|day / adjust = tukey;

run;

 

Question 2: when I include the "adjust=tukey", although I observe significant effect (P<0.05) in the model, none of the adjust p-values are significant (only the non-adjusted p-values). Which p-value should I use when interpreting the p-values?

3 REPLIES 3
DG1979
Calcite | Level 5
correction: the 7th measurement was the baseline assessment included as covariate.
StatsMan
SAS Super FREQ

One problem with this model is that the RANDOM and REPEATED statements are fitting the same covariance structure in Z. The RANDOM statement does this through G and the REPEATED through R. You should get a message about the G matrix or Hessian being non-positive definite with this model. Most of the time, MIXED will set one of the variance components to 0 to make this more obvious for you. To "fix" this, try using AR(1) (or any structure other than CS) on the REPEATED statement. 

Your LSMEANS statement is making comparisons among levels of your 3-way interaction at the average value of the covariate. You can try using the AT option to see if there are differences in the interaction at other, possibly more interesting, values of the covariate.

SteveDenham
Jade | Level 19

I would caution you about any inferences regarding drug or treatment. The design I see completely confounds drug*treatment with pen, and for a lot of folks that would mean that pen is the experimental unit, and animals are observational units measured on each of the pens.  You might be able to use the following, but I provide no guarantees. I moved to the spatial power covariance structure because I believe the residuals will be correlated with those closer in time more highly correlated. The autoregressive error structures (including ANTE and ARMA) treat the time points as being equally spaced in time. I also fit pen as an effect, rather than trt or drug. You can get LSMEAN-like estimates for the various levels of each by using LSMESTIMATE statements to manipulate the pen lsmeans. I added the /e option to the LSMEANS statement to facilitate construction of the LSMESTIMATES:

 

proc mixed data= XX;
class animal pen day;
model BW = pen|day initial_BW ddfm=kr;
random intercept / subject = animal;
repeated days / subject = animal type = sp(pow)(t); /* t is a continuous version of 'day' */
lsmeans pen|day /e adjust = tukey;
/* Add a section of LSMESTIMATE code here to calculate trt and drug means and differences */
run;

SteveDenham

 

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 16. 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
  • 3 replies
  • 413 views
  • 1 like
  • 3 in conversation