[R-sig-ME] interaction model and variance in lme
David Springate
David.Springate at postgrad.manchester.ac.uk
Wed Feb 11 23:19:42 CET 2009
Hi,
I am new to R and I have been trying to build a model that I can
extract ML variance components for the interaction from, but am
struggling to make sense of the formula.
I am looking at the interaction of family (random) and two
environmental treatments (fixed) on a trait. So far I have tried:
model=lme(trait~treatment,data=dataset,random=~1|family/treatment)
But this seems to give me just the treatment nested in the family
rather than family*treatment values.
I also tried:
Model = lme(trait~family*treatment,data=dataset,random=~1|family)
which gives me an interaction MS and F value in an anova, but seems to
treat each interaction between each treatment and family as a separate
fixed factor. Also VarCorr() doesn't seem to give a variance for the
interaction term.
What am I doing wrong?
I am sure this should be simple, but the docs seem pretty unclear to
me on modeling interactions.
Help please!
David Springate
More information about the R-sig-mixed-models
mailing list