[R] advise for modeling a linear mixed model
Frank Mattes
f.mattes at ucl.ac.uk
Fri Aug 22 22:40:08 CEST 2003
Dear R help-list reader,
I'm trying to investigate my data with linear mixed model and are
seeking advise how to write the model in R. I was trying to get hold
of the recommended book from Bates et al, but neither the major
bookshop nor our university library had the book. My data is
mirroring the example given in the appendix of John Foxes book
"Applied Regression" with a small exception.
I'm interested in a frequency (freq) of a particular cell type which
was measured longitudinal in patients (p) and control group (c). In
addition, each sample was measured four times (repeat) with a
possible factor influencing the sensitivity (gated).
Here my data frame:
ID freq day repeat group gated
1 0.1 1 1 c 10000
1 0.15 1 2 c 12000
1 0.2 1 3 c 50000
1 0.1 1 4 c 12000
1 0.5 12 1 c 12000
1 0.1 12 2 c 50000
1 0.2 12 3 c 100000
1 0.4 12 4 c 70000
1 0.2 5 1 p 15000
2 0.25 5 2 p 6000
2 .
2 .
So I could write a model with a fixed effects for day and group and
their interaction.
lme(freq ~ day*group, random = ~day | ID data=frame)
I'm expecting possible effect of "gated" on the frequency. I don't
know how to include the fact that I have four measures from the same
sample and an effect of the variable "gated" on the frequency.
I'm appreciate any help, and apologize in case I have not read
carefully the available documentation.
Frank
--
Frank Mattes e-mail: f.mattes at ucl.ac.uk
Department of Virology fax 0044(0)207 8302854
Royal Free Hospital and tel 0044(0)207 8302997
University College Medical School
London
More information about the R-help
mailing list