From: Dov Stekel <d.j.stekel_at_bham.ac.uk>

Date: Mon 31 Jul 2006 - 23:22:14 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Aug 01 02:48:30 2006

Date: Mon 31 Jul 2006 - 23:22:14 EST

Hi

I have been asked by a colleague to perform a statistical analysis which uses random effects - but I am struggling to get this to work with nlme in R. Help would be very much appreciated!

Essentially, the data consists of:

Patient When Treat Measurement a before A 10.3 a before A 11.2

...

a after A 12.4

...

a before B 11.6

...

a after B ...

and the same for treatment C, patients, b,c,d, etc.

My colleague would like to test to see if the treatments are different from each other. i.e., is the change (before to after) due to the treatments different between the treatments. It would seem to me like a random effects model in which we are interested in the significance of the interaction terms Treat:When, with repeated measures in the patients (who are random effects, but crossed with the covariates). Unfortunately, the groupedData formula only lets me put a single covariate on the LHS - nothing as complicated as this!

I could, of course, advise her to simply combine all 30 data points for each treatment in each patient into a single number (representing difference between before and after), but is there a way to use all the data in an LME?

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Aug 01 02:48:30 2006

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.1.8, at Tue 01 Aug 2006 - 04:17:10 EST.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*