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
... View more