Date: Wed, 26 Mar 2008 13:23:05 -0700 Robin High "SAS(r) Discussion" Robin High Re: Repeated measure in Mixed procedure To: Walid Alali A<200803261916.m2QHROXw030429@malibu.cc.uga.edu> text/plain; charset="us-ascii"

Walid,

In the "old" days a researcher would have computed the means for each day and analyzed those :( ... but there are other options (including a totally random effects approach, which I won't illustrate).

MIXED offers the double-multivariate option by adding a second 'repeated' factor on the REPEATED statement, called 'trial' or 'time' or some variable entered into the dataset that is numbered 1 2 3 (see first few records below).

Add time to the CLASS and REPEATED statements with one of the three Dbl-Mlvt covariance options:

proc mixed data=data; class pen TRT Day animal time; model response= TRT Day TRT*Day ; random pen; repeated Day time / subject = animal(TRT) type = un@ar(1) r rcorr; lsmeans TRTcode Day TRTcode*Day/diff; run;

un@ar(1) is relevant if the time spans are equal each day. If not, other choices are type=ar@cs and type=un@un

You may have convergence issues (at least I have with numbers in the 1000's). If so, dividing the response by 100 or some constant has helped.

Robin High University of Oregon

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Walid Alali Sent: Wednesday, March 26, 2008 12:16 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Repeated measure in Mixed procedure

Hello all,

I am having trouble finding the best way of including all sources of variability in my mixed model.

My study design (which is a clinical trial) goes like this: I have 3 pens, in each pen; 10 animals (5 exposed and 5 controls). The response (i.e. the outcome) is measured over time (every week for 2 months). To make this complicated, the response was measured in triplicate (i.e. 3 times) at each time point.

Here is a glimpse of the data (just for the 1st pen): Animal TRT DAY Pen Replicate response time 151 E 0 5 1 6.75E+03 1 151 E 0 5 1 6.22E+03 2 151 E 0 5 1 4.98E+03 3 152 E 0 5 10 6.25E+03 1 152 E 0 5 10 8.92E+03 2 152 E 0 5 10 6.09E+03 3 153 E 0 5 2 7.38E+03 1 153 E 0 5 2 4.68E+03 2 153 E 0 5 2 6.94E+03 3 154 E 0 5 3 2.49E+03 154 E 0 5 3 2.31E+03 154 E 0 5 3 2.03E+03 155 E 0 5 4 1.32E+04 155 E 0 5 4 9.92E+03 155 E 0 5 4 9.49E+03 156 C 0 5 5 4.22E+03 156 C 0 5 5 4.21E+03 156 C 0 5 5 3.46E+03 157 C 0 5 6 3.70E+03 157 C 0 5 6 3.62E+03 157 C 0 5 6 2.85E+03 158 C 0 5 7 1.54E+03 158 C 0 5 7 1.38E+03 158 C 0 5 7 1.63E+03 159 C 0 5 8 5.16E+03 159 C 0 5 8 5.00E+03 159 C 0 5 8 4.66E+03 160 C 0 5 9 5.37E+03 160 C 0 5 9 5.30E+03 160 C 0 5 9 5.41E+03

I have the model set up like this, but not sure how to include 'replicate' in it??

proc mixed data=data; class pen TRT Day animal; model response= TRT Day TRT*Day ; random pen; repeated Day / subject = animal(TRT) type = un r rcorr; lsmeans TRTcode Day TRTcode*Day/diff; run;

Any comments, suggestions are very wellcome. Thanks in advance, Walid.

Walid Alali DVM, MS, PhD Epidemiology Post-doctoral Research Associate Department of Veterinary Integrative Biosciences College of Veterinary Medicine and Biomedical Sciences Texas A&M University 4458 TAMU College Station, TX, USA 77843-4458

Back to: Top of message | Previous page | Main SAS-L page