Re: [R] R Mixed Anova

From: Mark Difford <mark_difford_at_yahoo.co.uk>
Date: Thu, 06 Nov 2008 03:21:36 -0800 (PST)

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:
>
> Hi list, I was searching how to properly write a command line for a mixed
> ANOVA. Well honestly, there are so many material on the older post of the
> list that just confused me.
>
> I have five factors.
>
>
>
> Season (fixed)
>
> Beach (fixed)
>
> Line (fixed)
>
> Block (random)
>
> Strata (random) nested in Block
>
>
>
> And for each of the tree strata per block I got 3 replicates.
>
>
>
> I saw lots of things about “different” linear models commands… lm, lme… On
> R
> help I found aov and anova…
>
>
>
> Any one knows what should be more adequate and how I write and appropriate
> command line? I need an ANOVA table, a p value, and be able to run post
> hoc
> tests.
>
>
>
> Thanks for your attention and patience.
>
>
>
> ___________________________________
> MSc. <mailto:r.aluizio_at_gmail.com> Rodrigo Aluizio
> Centro de Estudos do Mar/UFPR
> Laboratório de Micropaleontologia
> Avenida Beira Mar s/n - CEP 83255-000
> Pontal do Paraná - PR - BRASIL
> Fone: (0**41) 3455-1496 ramal 217
> Fax: (0**41) 3455-1105
>
>
>
>
> [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>

-- 
View this message in context: http://www.nabble.com/R-Mixed-Anova-tp20358811p20359309.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 06 Nov 2008 - 11:27:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 06 Nov 2008 - 14:00:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive