Consider a population of seed packets and a population of fields in Dane County. The experiment consists of taking a random sample of seed packets and a random sample of fields, then placing several seeds from each seed packet in each field. Individual plants grown from seed are measured for yield at the end of the growing season.
1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 | data( Rantwo )
Rantwo$seed = factor( Rantwo$seed )
Rantwo$farm = factor( Rantwo$farm )
Rantwo$seedfarm = with( Rantwo, seed:farm)
Rantwo.fit <- aov( yield ~ seed * farm, Rantwo )
summary( Rantwo.fit )
library( lme4 )
Rantwo.lme <- lmer(yield ~ 1 + (1|seed) + (1|farm) + (1|seedfarm),
data = Rantwo )
summary( Rantwo.lme )
Rantwo.lmep <- lmer(yield ~ 1 + (1|seed) + (1|farm),
data = Rantwo )
anova(Rantwo.lme,Rantwo.lmep)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.