Hello, I want to do this model: Y_ml=Mu+M+L(M)+Error M is a fixed factor with two levels, 1 and 2 L is a random factor and nested in M, with 9 levels (9 places inside each level of M) amarc is the dependent variable (animal abundance) datos is the matrix I used the next orders in R, but there is a problem with the Df calculation:> m[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 [39] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2> l[1] 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 [26] 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 [51] 17 18 18 18> amarc[1] 4 9 1 2 1 2 9 6 15 8 10 8 10 7 3 2 1 1 2 1 1 1 4 3 2 [26] 0 2 4 0 1 0 0 0 1 1 0 4 4 4 3 0 1 0 1 0 1 0 1 0 0 [51] 3 1 0 1> summary(aov(amarc~m+l%in%m,datos))Df Sum Sq Mean Sq F value Pr(>F) m 1 130.67 130.67 15.6088 0.0002401 *** m:l 1 19.65 19.65 2.3478 0.1316381 Residuals 51 426.94 8.37 --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 I think that the correct calculation of Df is: (Underwood, 1997. Experiments in Ecology: their logical design and interpretation using analysis of variance. Cambridge University Press.) Df m 1 m:l 16 Residuals 36 Where is the problem? Why Df are differents? How can I do this model? Thaks for all. Marcelo. -------------- next part -------------- An embedded message was scrubbed... From: Jan Krupa <krupa at alpha.sggw.waw.pl> Subject: [R] archive of the mailing list? Date: Mon, 8 Nov 1999 16:51:53 +0100 (EET) Size: 1697 Url: https://stat.ethz.ch/pipermail/r-help/attachments/20000304/c8d0d4c9/attachment.mht
> Date: Sat, 04 Mar 2000 12:19:46 +0000 > From: Marcelo Martinez Palao <marmp at fcu.um.es> > > > I want to do this model: > > Y_ml=Mu+M+L(M)+Error > > M is a fixed factor with two levels, 1 and 2 > L is a random factor and nested in M, with 9 levels (9 places inside > each level of M)L and M appear to be sets of numbers, not R factors, and you have not declared L to be random.> M <- factor(rep(1:2, rep(27, 2))) > L <- factor(rep(1:18, rep(3, 18))) > summary(aov(amarc ~ M + M/L))Df Sum Sq Mean Sq F value Pr(>F) M 1 130.667 130.667 35.2800 8.366e-07 M:L 16 313.259 19.579 5.2863 1.682e-05 Residuals 36 133.333 3.704 If you really want L to be random, you will need to used a Error term. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._