Skip to content
Prev 22657 / 398502 Next

Why can't Anove (car package) see the data?

At the end of the 'Details:' section of the help on Anova (car
package), it states:

     The standard R `anova' function calculates sequential (type-I)
     tests. These rarely test meaningful hypotheses.

So I thought I'd try it.  However, I was perplexed to get this
message:

Browse[1]> Anova.glm(leaf.glm1, type ="II")
Error in terms.formula(formula, data = data) : 
	Object "use.df" not found

The regular anova function can find use.df.  What could make it
invisible to Anova?  I thought it might be because terms.formula took
an argument x and I already had an object x, but changing its name
didn't help.  I spent some time searching the archives but found no
mention of this problem.  I read some of the car package help files,
but didn't notice a reference to what is different in the way data is
seen.

The example given in the help file does work, but it uses a data
object which is in the working directory.  That's not practicable
within a function.  So I'd appreciate other ideas.

platform i686-pc-linux-gnu
arch     i686             
os       linux-gnu        
system   i686, linux-gnu  
status                    
major    1                
minor    5.1              
year     2002             
month    06               
day      17               
language R                

Thanks