[R] lme model specification

Green, Gerwyn (greeng6) g.green8 at lancaster.ac.uk
Sun Nov 15 14:19:07 CET 2009


Dear all

this is a question of model specification in lme which I'd for which I'd greatly appreciate some guidance.

Suppose I have data in long format

gene treatment rep Y
1        1      1  4.32
1        1      2  4.67
1        1      3  5.09
.        .      .    .
.        .      .    .
.        .      .    .
1        4      1   3.67
1        4      2   4.64
1        4      3   4.87
.        .      .    .
.        .      .    .
.        .      .    . 
2000     1      1  5.12
2000     1      2  2.87
2000     1      3  7.23
.        .      .    .
.        .      .    .
.        .      .    .
2000     4      1   2.48
2000     4      2   3.93
2000     4      3   5.17


that is, I have data Y_{gtr} for g (gene) =1,...,2000    t (treatment) = 1,...,4 and    r (replicate) = 1,...,3

I would like to fit the following linear mixed model using lme

Y_{gtr} = \mu_{g} +  W_{gt} + Z_{gtr}

where the \mu_{g}'s are fixed gene effects, W_{gt} ~ N(0, \sigma^{2}) gene-treatment interactions, and residual errors Z_{gtr} ~ N(0,\tau^{2}). (Yes, I know I'm specifying an interaction between gene and treatment without specifying a treatment main effect ! - there is good reason for this)


I know that specifying

model.1 <- lme(Y ~ -1 + factor(gene), data=data, random= ~1|gene/treatment)

fits Y_{gtr} = \mu_{g} +  U_{g} + W_{gt} + Z_{gtr}

with \mu_{g}, W_{gt}  and Z_{gtr} as previous and U_{g} ~ N(0,\gamma^{2}), but I do NOT want to specify a random gene effect. I have scoured Bates and Pinheiro without coming across a parallel example. 


Any help would be greatly appreciated

Best


Gerwyn Green
School of Health and Medicine
Lancaster Uinversity




More information about the R-help mailing list