[R] help with anova()

brianiphk bwip at ucdavis.edu
Wed Dec 15 20:12:10 CET 2010

I'm trying to run an ANOVA in R and I have a problem:

I used this command: anova(lm(time~age*region*facility))
Age, region, and facility are all factor levels, which has 2, 4, and 3
levels respectively.

however, in the output (anova table), it states that the df is 1 for all
three factors, which should be 1, 3, and 2 respectively. 

Can anyone tell me if it is necessary to declare the factors as class before
it can run correctly? Or is there any other problem?

I attached the data set as shown below. 

Thank you very much!

( http://r.789695.n4.nabble.com/file/n3089686/data1.csv data1.csv   

View this message in context: http://r.789695.n4.nabble.com/help-with-anova-tp3089686p3089686.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list