[R] Problem with Anova() in package "car"
gangchen6 at gmail.com
Tue Jan 13 23:44:19 CET 2015
Thanks a lot for the quick response and fix! I'm looking forward to
try out the development version. I assume that the fix will be
released in the official version at some point.
On Tue, Jan 13, 2015 at 5:06 PM, John Fox <jfox at mcmaster.ca> wrote:
> Dear Gang,
> 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