Skip to content

R Mixed Anova

3 messages · Rodrigo Aluizio, Mark Difford

#
Hi Rodrigo,

Here are two options; for each type, the second version gives 2nd order
interactions

## aov
T.aovmod <- aov(response ~ Season + Beach + Line + Error(Block/Strata))
T.aovmod <- aov(response ~ (Season + Beach + Line)^2 + Error(Block/Strata))

## lme
library(nlme)
T.lmemod <- lme(response ~ Season + Beach + Line, random = ~ 1 |
Block/Strata)
T.lmemod <- lme(response ~ (Season + Beach + Line)^2, random = ~ 1 |
Block/Strata)
anova(T.lmemod)
?anova.lme

## Use package multcomp for doing post-hoc analysis.

Regards, Mark.
Rodrigo Aluizio wrote:
lm, lme
 On

  
    
#
Thanks Mark, it was exactly what I was looking for.

-----Mensagem original-----
De: r-help-bounces em r-project.org [mailto:r-help-bounces em r-project.org] Em nome de Mark Difford
Enviada em: quinta-feira, 6 de novembro de 2008 09:22
Para: r-help em r-project.org
Assunto: Re: [R] R Mixed Anova


Hi Rodrigo,

Here are two options; for each type, the second version gives 2nd order
interactions

## aov
T.aovmod <- aov(response ~ Season + Beach + Line + Error(Block/Strata))
T.aovmod <- aov(response ~ (Season + Beach + Line)^2 + Error(Block/Strata))

## lme
library(nlme)
T.lmemod <- lme(response ~ Season + Beach + Line, random = ~ 1 |
Block/Strata)
T.lmemod <- lme(response ~ (Season + Beach + Line)^2, random = ~ 1 |
Block/Strata)
anova(T.lmemod)
?anova.lme

## Use package multcomp for doing post-hoc analysis.

Regards, Mark.
Rodrigo Aluizio wrote: