[R] anova table

Kaspar Pflugshaupt pflugshaupt at geobot.umnw.ethz.ch
Wed Apr 4 09:44:54 CEST 2001


On Wednesday 04 April 2001 07:20, George A. Dowding wrote:
> I am taking a stats class and need to do a single factor anova table
> with four treatments for an assignment.  The instructor showed the
> class how to do it with minitab, and I am unsure how to proceede in
> R.
>
> Here is the data:
>
> I.   .8 .2 1.4 .9 .9 1.0 1.0 1.1 1.4 1.2 1.0
> II.  1.6 1.1 .2 1.3 1.5 .7 .5 1.3 1.3 .4
> III  1.8 .3 1.1 2.0 2.8 1.5 1.3 2.9 1.7 .8
> IV.  2.4 2.6 2.82.9 1.7 2.6 2.7 2.1 2.1 2.3
>
> I have been reading the various help files and can't quite finde the
> right example to get started from.

Try help(aov). Basically, you will have to  bring your data into a form like

treatment	response
1		.8
1		.2
2		1.6
2		1.1
...		...

and then use something like

model <- aov(response~treatment)
summary(model)

This will give you a standard ANOVA table.

Cheers (and good luck with the assignment)

Kaspar


-- 

Kaspar Pflugshaupt
Geobotanical Institute
ETH Zurich, Switzerland
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list