[R] Problem with Anova() in package "car"
gangchen6 at gmail.com
Tue Jan 13 19:48:21 CET 2015
I'm having some trouble with Anova() in package "car". When the model
formula is explicitly expressed:
fm <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1)
Anova() works fine:
However, if the model formula is scanned from an external source:
myModel <- as.formula("distance ~ age + Sex")
fm2 <- lme(myModel, data = Orthodont, random = ~ 1)
I get the following error:
Error: object of type 'symbol' is not subsettable
How to resolve the situation when the model formula is defined externally?
More information about the R-help