Skip to content
Prev 8685 / 398502 Next

anova

Cobalt wrote:
1. You'll need c() to make this work.
2. That's not a nice solution, because "c" is already the name of a very
basic function (that one you have to use here).

What you mean is, e.g.:

   a1 <- c(85, 75, 82, 76, 71, 85)
         ^
   a2 <- c(71, 75, 73, 74, 69, 82) 
         ^
   a3 <- c(59, 64, 62, 69, 75, 67)
   ^^    ^
Stop! From the help:

1. "Usage: anova(object, ...)" 
2. "Arguments:  *object*  an object containing the results returned by a
model fitting function (e.g. lm or glm). "
So a *sample* session:

   a1 <- c(85, 75, 82, 76, 71, 85)
   a2 <- c(71, 75, 73, 74, 69, 82) 
   a3 <- c(59, 64, 62, 69, 75, 67)
   my.obj <- lm(a1 ~ a2 + a3)
   anova(my.obj)


Hope this helps.

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._