[R] What is the difference between anova {stats} and aov?
Chuck Cleland
ccleland at optonline.net
Tue Oct 27 18:16:59 CET 2009
On 10/27/2009 1:06 PM, Peng Yu wrote:
> There are anova {stats} and aov in R. It seems that anova takes an
> object returned by a model fitting function. But I don't see any
> examples for anova. Can somebody give me a simple example on anova?
> What is the difference between anova and aov?
http://finzi.psych.upenn.edu/Rhelp08/2009-January/184619.html
fm1 <- aov(breaks ~ tension + wool, data=warpbreaks)
fm2 <- aov(breaks ~ tension * wool, data=warpbreaks)
anova(fm1)
anova(fm2)
anova(fm1, fm2)
See ?anova.lm and ?anova.glm for more anova() examples.
> ______________________________________________
> 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.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894
More information about the R-help
mailing list