Re: [R] multiple ANOVAs

From: Greg Snow <Greg.Snow_at_imail.org>
Date: Fri, 14 Dec 2007 09:48:23 -0700

Look at ?by and if that is not enough then look at the doBy package. If neither of those give you what you want, then give us more detail to help you with.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow_at_imail.org
(801) 408-8111
 
 


> -----Original Message-----
> From: r-help-bounces_at_r-project.org
> [mailto:r-help-bounces_at_r-project.org] On Behalf Of Kevin J Emerson
> Sent: Thursday, December 13, 2007 1:21 PM
> To: r-help_at_r-project.org
> Subject: [R] multiple ANOVAs
>
> Hello R help-ers,
>
>
> I have a basic question, but I have been playing with it for
> a while and haven't quite gotten a hang of how to get it
> working. I want to perform multiple one-way ANOVAs on
> subsets of data and am not sure how to do it in an automated
> way. I am thinking of doing something similar to 'aggregate'
> but I would like to collect all of the ANOVA results in a way
> in which I can get to the information from each of the
> independent ANOVAs. In effect, I would like a data frame
> with each of the subset identifiers, F and P values in the
> rows. Or a list of all of the ANOVA summaries or something like that.
>
>
>
> I would like to do an anova of the form aov(var ~ day) for
> each subset of data corresponding to "temp" and "line". I
> have lots of temps and lines and would like to do this in an
> automated fashion. I know of the aggregate function for
> doing this kind of thing to compute means etc, but I am not
> sure how to call an anova in this way. I have looked at "by"
> and "apply"
> and have tried various things but am unable to get it to work.
>
>
>
> Any help would be greatly appreciated. A sample of the
> dataset is below.
>
>
>
> Thank you for your time,
>
> Kevin
>
>
>
>
>
> temp line day var
>
> 12 WMG 1 LD 70.59
>
> 12 WMG 1 LD 100.00
>
> 12 WMG 1 LD 100.00
>
> 12 WMG 1 SD 85.00
>
> 12 WMG 1 SD 75.00
>
> 12 WMG 1 SD 90.00
>
> 12 WMG 2 LD 100.00
>
> 12 WMG 2 LD 83.33
>
> 12 WMG 2 LD 100.00
>
> 12 WMG 2 SD 91.67
>
> 14 WMG 1 LD 76.03
>
> .
>
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Received on Fri 14 Dec 2007 - 16:55:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 14 Dec 2007 - 17:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.