Hi, I have a two-way anova with unequal cell numbers that I want to analyze. The problem is I don't have individual observations of the data. I only have the sufficient statistics (mean, variance, # of observations) for each cell. Is there any existing function in S-plus that would allow me to do aov() with the sufficient statistics? The table is like G1 G2 G3 G5 G6 T1 T2 T3 For cell (Ti, Gj) i have mean, variance and # observations and the factors are unordered. Thanks a lot for helping me on this in advance. Yun-Fang [[alternative HTML version deleted]]
You can apply the trick that Prof. Dalgaard recently posted in response to a similar question (for one-way ANOVA). For each cell, generate data as: y <- cell.mean + cell.sd * scale(rnorm(cell.count)) Then generate the data frame to feed to aov. HTH, Andy> From: Yun-Fang Juan > > Hi, > I have a two-way anova with unequal cell numbers that I want > to analyze. > The problem is I don't have individual observations of the data. > I only have the sufficient statistics (mean, variance, # of > observations) for each cell. > Is there any existing function in S-plus that would allow me > to do aov() with the sufficient statistics? > > The table is like > > G1 G2 G3 G5 G6 > T1 > T2 > T3 > > > For cell (Ti, Gj) i have mean, variance and # observations > and the factors are unordered. > > Thanks a lot for helping me on this in advance. > > > Yun-Fang > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments,...{{dropped}}
> > >Hi, >I have a two-way anova with unequal cell numbers that I want to analyze. >The problem is I don't have individual observations of the data. >I only have the sufficient statistics (mean, variance, # of observations) for each cell. >Is there any existing function in S-plus that would allow me to do aov() with the sufficient statistics? > >See: David Larsen, Analysis of Variance With Just Summary Statistics as Input, The American Statistician, May 1992, Vol. 46(2), 151-152. This is implemented in SAS, Doc: http://www.math.yorku.ca/SCS/sasmac/stat2dat.html Shouldn't be hard to do in R. -- Michael Friendly Email: friendly at yorku.ca Professor, Psychology Dept. York University Voice: 416 736-5115 x66249 Fax: 416 736-5814 4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html Toronto, ONT M3J 1P3 CANADA
> > >You can apply the trick that Prof. Dalgaard recently posted in response to a >similar question (for one-way ANOVA). For each cell, generate data as: > >y <- cell.mean + cell.sd * scale(rnorm(cell.count)) > >Then generate the data frame to feed to aov. > > >That will generate only approximately the same means and MSE, however. Larsen's procedure generates a weighted data set that gives the same ANOVA table as the raw data, but requires that the weight= argument be used in aov(). (weights are not supported in all related functions) -Michael -- Michael Friendly Email: friendly at yorku.ca Professor, Psychology Dept. York University Voice: 416 736-5115 x66249 Fax: 416 736-5814 4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html Toronto, ONT M3J 1P3 CANADA