[R] Using lme() for split plot

Joshua Stults joshua.stults at gmail.com
Thu May 7 23:13:03 CEST 2009


Hi,

I'm trying to figure out how to use lme() for analyzing a split-plot
experiment.  I've been looking at the examples from the 'R Book',
those are nested but with only one factor at the whole-plot level, my
test is 2^2 at the whole-plot level, with a single many level factor
at the sub-plot level.  My question is about properly specifying the
random effects part of the model,

lme( y ~ block + a*b*poly(c, n), random=~ ? )

Where 'a' and 'b' are my two level whole-plot factors and 'c' is the
many level sub-plot factor.  I'm not sure what to use to get the right
error terms.  Do I use two error terms:

random = ~ 1 | block/a + 1 | block/b

or one:

random = ~ 1 | block/a*b

or something else entirely?  I haven't been able to find any relevant
examples on Google. Thanks for any suggestions/pointers.

-- 
Joshua Stults
Website: http://j-stults.blogspot.com




More information about the R-help mailing list