Can anybody explain me what does it mean "Estimated effects may be unbalanced", and what does it imply for the anova analysis? Here a case example of what I get. > D<-expand.grid(A=c(0,1,2,3),B=c(0,1),C=c(0,1),res=c(runif(30,0,1))) > aov(res~A*B*C,data=D) Call: aov(formula = res ~ A * B * C, data = D) Terms: A B C A:B A:C B:C A:B:C Residuals Sum of Squares 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 50.93402 Deg. of Freedom 1 1 1 1 1 1 1 472 Residual standard error: 0.3284982 Estimated effects may be unbalanced Thanks in advance PS: > R.Version() $platform [1] "powerpc-apple-darwin8.10.1" $arch [1] "powerpc" $os [1] "darwin8.10.1" $system [1] "powerpc, darwin8.10.1" $status [1] "" $major [1] "2" $minor [1] "6.0" $year [1] "2007" $month [1] "10" $day [1] "03" $`svn rev` [1] "43063" $language [1] "R" $version.string [1] "R version 2.6.0 (2007-10-03)" -------------------------------------------------------------------- Max MANFRIN Tel.: +32 (0)2 650 3168 IRIDIA - CoDE, CP 194/6 Fax.: +32 (0)2 650 2715 Universit? Libre de Bruxelles Av. F. D. Roosevelt, 50 1050 Brussels Email: mmanfrin at ulb.ac.be BELGIUM WWW: http://iridia.ulb.ac.be/~mmanfrin gpg DSA: 0xD3956AAF gpg fingerprint: 1D69 8664 EF25 FCDE 229F FCA1 E66F EAC5 D395 6AAF -------------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : https://stat.ethz.ch/pipermail/r-help/attachments/20071022/4a89cddc/attachment.bin
On Mon, 22 Oct 2007, Max Manfrin wrote:> Can anybody explain me what does it mean "Estimated effects may be > unbalanced", and what does it imply for the anova analysis?The help page does! I suspect you intended to use factors, and have not done so, and also that you did not intend to replicate res. Try D <- expand.grid(A=factor(c(0,1,2,3)),B=factor(c(0,1)),C=factor(c(0,1))) aov(rnorm(16) ~ A * B * C, data = D)> > Here a case example of what I get. > >> D<-expand.grid(A=c(0,1,2,3),B=c(0,1),C=c(0,1),res=c(runif(30,0,1))) >> aov(res~A*B*C,data=D) > Call: > aov(formula = res ~ A * B * C, data = D) > > Terms: > A B C A:B A:C B:C A:B:C > Residuals > Sum of Squares 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 > 0.00000 50.93402 > Deg. of Freedom 1 1 1 1 1 1 > 1 472 > > Residual standard error: 0.3284982 > Estimated effects may be unbalanced > > Thanks in advance > > > PS: > R.Version() > $platform > [1] "powerpc-apple-darwin8.10.1" > > $arch > [1] "powerpc" > > $os > [1] "darwin8.10.1" > > $system > [1] "powerpc, darwin8.10.1" > > $status > [1] "" > > $major > [1] "2" > > $minor > [1] "6.0" > > $year > [1] "2007" > > $month > [1] "10" > > $day > [1] "03" > > $`svn rev` > [1] "43063" > > $language > [1] "R" > > $version.string > [1] "R version 2.6.0 (2007-10-03)" > > > -------------------------------------------------------------------- > Max MANFRIN Tel.: +32 (0)2 650 3168 > IRIDIA - CoDE, CP 194/6 Fax.: +32 (0)2 650 2715 > Universit? Libre de Bruxelles > Av. F. D. Roosevelt, 50 > 1050 Brussels Email: mmanfrin at ulb.ac.be > BELGIUM WWW: http://iridia.ulb.ac.be/~mmanfrin > > gpg DSA: 0xD3956AAF > gpg fingerprint: 1D69 8664 EF25 FCDE 229F FCA1 E66F EAC5 D395 6AAF > -------------------------------------------------------------------- > >-- 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 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On 22 Oct 2007, at 10:50, Prof Brian Ripley wrote:> On Mon, 22 Oct 2007, Max Manfrin wrote: > >> Can anybody explain me what does it mean "Estimated effects may be >> unbalanced", and what does it imply for the anova analysis? > > The help page does! I suspect you intended to use factors, and > have not done so, and also that you did not intend to replicate res. > > Try > > D <- expand.grid(A=factor(c(0,1,2,3)),B=factor(c(0,1)),C=factor(c > (0,1))) > aov(rnorm(16) ~ A * B * C, data = D)> D<-expand.grid(A=factor(c(0,1,2,3)),B=factor(c(0,1)),C=factor(c (0,1))) > D A B C 1 0 0 0 2 1 0 0 3 2 0 0 4 3 0 0 5 0 1 0 6 1 1 0 7 2 1 0 8 3 1 0 9 0 0 1 10 1 0 1 11 2 0 1 12 3 0 1 13 0 1 1 14 1 1 1 15 2 1 1 16 3 1 1 > aov(rnorm(16) ~ A*B*C, data=D) Call: aov(formula = rnorm(16) ~ A * B * C, data = D) Terms: A B C A:B A:C B:C A:B:C Sum of Squares 9.327827 0.256657 0.172870 4.054674 0.079648 3.214687 2.828070 Deg. of Freedom 3 1 1 3 3 1 3 Estimated effects may be unbalanced > !is.list(replications(formula=rnorm(16)~A*B*C,data=D)) [1] TRUE The number of replicates for each factor is the same. I guess that the unbalanced refers to the number of observations that each level in a factor has, am I correct? For calculating HSDTukey confidence intervals for interaction plots in such unbalanced design, what should I do? Thanks in advance. -------------------------------------------------------------------- Max MANFRIN Tel.: +32 (0)2 650 3168 IRIDIA - CoDE, CP 194/6 Fax.: +32 (0)2 650 2715 Universit? Libre de Bruxelles Av. F. D. Roosevelt, 50 1050 Brussels Email: mmanfrin at ulb.ac.be BELGIUM WWW: http://iridia.ulb.ac.be/~mmanfrin gpg DSA: 0xD3956AAF gpg fingerprint: 1D69 8664 EF25 FCDE 229F FCA1 E66F EAC5 D395 6AAF -------------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : https://stat.ethz.ch/pipermail/r-help/attachments/20071022/2c9aa736/attachment.bin