[R] Random Effects Model with Interacting Covariates

From: Dov Stekel <d.j.stekel_at_bham.ac.uk>
Date: Mon 31 Jul 2006 - 23:22:14 EST


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:

10 patients. Each patient has been given three different treatments (on three separate days). 15 measurements (continuous variable) have been taken from each patient both before and after each of the treatments. So the data looks like:

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?



Dr Dov Stekel
Lecturer in Bioinformatics
School of Biosciences
University of Birmingham
Birmingham B15 2TT
Tel: +44 121 414 4209
Email: d.j.stekel@bham.ac.uk

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.