[R] Fwd: model simplification in repeated anova
Michael Greeff
michael.greeff at env.ethz.ch
Wed Jan 17 15:51:29 CET 2007
Hi,
I tried to do a model simplification in repeated anovas. obviously
it's not possible to use the function "anova" straight away. I got
the suggestion to do it with proj (see below). In my data, however, I
have in "block" not the third order interaction (n:p:k), but to
factors and their interaction (population, site, population:site).
I somehow didn't manage to get the right aov after the projection.
> From: "Richard M. Heiberger" <rmh at temple.edu>
>
>
> npk.aovE <- aov(yield ~ N*P*K + Error(block), npk)
>
> np.k.aovE <- aov(yield ~ N*P+K + Error(block), npk)
>
>
> npk.proj <- proj(npk.aovE)
> npk.x <- npk.proj$block[,"N:P:K"]
>
> npk.aov <- aov(terms(yield ~ npk.x + block + N+P+K+N:P+N:K+P:K,
> keep.order=TRUE), npk)
>
> np.k.aov <- aov(terms(yield ~ block + N+P+K+N:P, keep.order=TRUE),
> npk)
>
> summary(npk.aov)
> summary(np.k.aov)
>
> anova(npk.aov, np.k.aov)
More information about the R-help
mailing list