[R] Problem with Anova() in package "car"
jfox at mcmaster.ca
Tue Jan 13 23:06:13 CET 2015
The problem was in the model.matrix.lme() method provided by the car
package, and is now fixed in the development version of the car package on
R-Forge. You should be able to install it from there via
install.packages("car", repos="http://R-Forge.R-project.org") after the
package is next built on R-Forge, usually in a day or so.
> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Gang Chen
> Sent: January-13-15 1:48 PM
> To: r-help
> Subject: [R] Problem with Anova() in package "car"
> 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?
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
This email has been checked for viruses by Avast antivirus software.
More information about the R-help