[R-sig-ME] Mixed effects ANOVA

fernando barbero fbarbero at bariloche.inta.gov.ar
Mon Sep 5 14:18:18 CEST 2011


Dear Carla, I think that you should run a LME model as this:
Log(Hrange)=rep (as a fixed effect)+ind (as a random effect)
Of course you should use lme4, I also think that rep might be nested under
ind, 
Best regards
Fernando



-----Mensaje original-----
De: r-sig-mixed-models-bounces at r-project.org
[mailto:r-sig-mixed-models-bounces at r-project.org] En nombre de Carla Freitas
Enviado el: viernes, 26 de agosto de 2011 07:48 a.m.
Para: r-sig-mixed-models at r-project.org
Asunto: [R-sig-ME] Mixed effects ANOVA

Dear all,
I have calculated the spring home range size from a sample of tracked
animals. I would like now to test whether their home range size is
significantly different between animals of different reproductive status.
Some of the animals were tracked in two different springs and have changed
reproductive state from one year to the other. I though therefore to run a
mixed effects ANOVA, using individual identification as random effect. I
used the function aov to do this (see below) but I'm not sure if it is the
correct way to do it. My interpretation of the results is that there are
significant differences in home range size between individuals of different
reproductive status and individual identification does not significantly
affects those differences in home range size. Is this the most correct way
to test my hypothesis? Or should I instead fit a mixed effects model using
lmer?

My dataset is the following:
(rep is reproductive status, hrange is home range size and ind is individual
id)

> mydata
      rep hrange  ind
1     coy  138.7 2166
3     coy  426.5 2172
6     coy  102.3 2178
7     coy   49.0 2182
9     coy  404.5 9678
12    coy   17.2 9690
13    coy  378.2 9692
14    coy  392.0 9695
17    coy   53.0 2170
20    coy   67.7 2175
22    coy   48.9 2185
24    coy   45.8 9692
2  single  350.1 2170
5  single 1069.4 2175
8  single  629.5 2185
10 single 2772.5 9679
16 single   16.2 2165
18 single  506.7 2172
19 single  371.5 2174
21 single  340.5 2178
23 single 6176.3 9684
25 single  271.9 9696
4    yrlg  414.4 2174
11   yrlg 4445.5 9684
15   yrlg  323.8 9696

The code I used to fit the ANOVA:
(note that I log transformed hrange to reach normality and homogeneity of
variances)

> summary(aov(log(hrange)~rep + Error(ind)),data=mydata)

Error: ind
          Df Sum Sq Mean Sq F value Pr(>F)
rep        2 12.593  6.2966  2.4796 0.1224
Residuals 13 33.011  2.5393

Error: Within
          Df Sum Sq Mean Sq F value  Pr(>F)
rep        2 7.3580  3.6790  5.6745 0.03429 *
Residuals  7 4.5383  0.6483
---

Thank you in advance for your help.

Carla



	[[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models




More information about the R-sig-mixed-models mailing list