RE: [R] ANOVA procedure on the sufficient statistics

2004-02-19 Thread Michael Friendly


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: [EMAIL PROTECTED] 
Professor, Psychology Dept.
York University  Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Streethttp://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT  M3J 1P3 CANADA

__
[EMAIL PROTECTED] 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


Re: [R] ANOVA procedure on the sufficient statistics

2004-02-19 Thread Duncan Murdoch
On Thu, 19 Feb 2004 08:45:01 -0500, Michael Friendly
[EMAIL PROTECTED] wrote :



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)

Are you sure about that?  I think the call to scale() makes them
come out identical.

In fact, the call to rnorm() is unnecessary; it would work just as
well with 

y - cell.mean + cell.sd * scale(1:cell.count)

(unless I'm missing something...)

Duncan

__
[EMAIL PROTECTED] 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


RE: [R] ANOVA procedure on the sufficient statistics

2004-02-18 Thread Liaw, Andy
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]]
 
 __
 [EMAIL PROTECTED] 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}}

__
[EMAIL PROTECTED] 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


re: [R] ANOVA procedure on the sufficient statistics

2004-02-18 Thread Michael Friendly


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: [EMAIL PROTECTED] 
Professor, Psychology Dept.
York University  Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Streethttp://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT  M3J 1P3 CANADA

__
[EMAIL PROTECTED] 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