[R] Random Effects Model with Interacting Covariates
Dov Stekel
d.j.stekel at bham.ac.uk
Mon Jul 31 15:22:14 CEST 2006
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:
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?
Thanks!
Dov
**************************************************************
Dr Dov Stekel
Lecturer in Bioinformatics
School of Biosciences
University of Birmingham
Birmingham B15 2TT
Tel: +44 121 414 4209
Email: d.j.stekel at bham.ac.uk
More information about the R-help
mailing list