[R] anova

Thomas Lumley thomas at biostat.washington.edu
Fri Aug 11 17:32:14 CEST 2000


On Fri, 11 Aug 2000, Peppy Adi Purnomo wrote:

> hello,
> 
> I have a very old R version

Actually, you have two very old R versions -- 0.64.2 is seriously obsolete
too.

>				 which calculates anova table for a stream of
> outcomes say: 1,5,4,3,2,4,5,2 which are grouped into 4 blocks, say A,B,C,D,
> of 2 say namely X,Y
> 
> What is the command in R 0.64.2 to do this?  My very old R command is
> anova.table but this command is unkown in R 0.64.2

You probably want to use aov().  It fits the model, then anova() displays
the classical ANOVA table.

aov() takes a formula as its input,eg
  anova(y~block)
for a one-way ANOVA. This would have y<-c(1,5,4,3,2,5,4,5,2) and
block<-factor(c("A","A","B","B","C","C","D","D"))

There are commands to simplify constructing balanced designs like block,
see help(gl) and help(rep).

	-thomas

Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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