[R-sig-ME] (no subject)

Adewale, Adeniyi adeniyi_adewale at merck.com
Wed Jun 1 19:59:51 CEST 2011


Does anyone know how to fit a repeated measures model in R with
unstructured variance-covariance matrix? Below is a SAS equivalent of
the model I am interested in:

proc mixed data=longdat;
	class alloc week;
	model y =  week  trt2wk1 trt2wk2 trt2wk3 trt2wk4/ddfm=kr covb
corrb solution;
	repeated week/type=un subject=alloc;
run;

I was able to fit a simpler model with compound symmetric
variance-covariance structure (or equivalently, for positively
correlated data, a simple random intercept model) using the lme function
in the nlme package:

fit <- lme(y ~ week + trt2wk1 + trt2wk2 + trt2wk3 +
trt2wk4,data=longdat,random=~1|alloc)

My example data is attached.
 <<longdat.txt>> 
Thanks.

Adeniyi Adewale

Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates Direct contact information
for affiliates is available at 
http://www.merck.com/contact/contacts.html) that may be confidential,
proprietary copyrighted and/or legally privileged. It is intended solely
for the use of the individual or entity named on this message. If you are
not the intended recipient, and have received this message in error,
please notify us immediately by reply e-mail and then delete it from 
your system.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: longdat.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20110601/29b10545/attachment-0004.txt>


More information about the R-sig-mixed-models mailing list