Does anybody knows what this error message means: Error in object$terms : $ operator not defined for this S4 class I have peformed the following steps:> library(lattice)> library(Matrix)> library(lme4)> inkm inkm$Gamie glm.incm drop1(glm.incm,test="Ch") Error in object$terms : $ operator not defined for this S4 classYour suggestin would be of a greatl help to me, Martin
On Feb 6, 2010, at 5:45 AM, Martin Bulla wrote:> Does anybody knows what this error message means: Error in object > $terms : $ operator not defined for this S4 class > > I have peformed the following steps: > > >> library(lattice) > >> library(Matrix) > >> library(lme4) > >> inkm inkm$Gamie glm.incm drop1(glm.incm,test="Ch") Error in object >> $terms : $ operator not defined for this S4 class >Is that a complete representation of your console? It doesn't look syntactically valid R as it came across to my mail-client, and it produces a different error message when pasted into my console. Shouldn't there be an operator after "inkm " (perhaps ";" if you wanted to see "inkm" before doing work on it)? And what is "inkm"? You are asked to offer reproducible examples. Did you want to assign the result of drop1() to glm.incm. If so, a "<-" would be needed, and I at least don't see one. So either your mail-client is not transmitting punctuation the same way some ((most?) of us are used to seeing it, or you have come from a programming world that is quite different than R.> > Your suggestin would be of a greatl help to me, > Martin > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius, MD Heritage Laboratories West Hartford, CT
On Sat, Feb 6, 2010 at 4:45 AM, Martin Bulla <bulla at centrum.cz> wrote:> Does anybody knows what this error message means: Error in object$terms : $ > operator not defined for this S4 classThe error message means what it says and it doesn't come from lmer, it comes from the drop1 function being applied to a model fit by lmer. You are assuming that you can apply drop1 to an lmer model and you can't. You need to do the modifications of the model formula by hand because an lmer formula contains terms that would not be meaningful for drop1.> I have peformed the following steps: > > >> library(lattice) > >> library(Matrix) > >> library(lme4) > >> inkm inkm$Gamie glm.incm drop1(glm.incm,test="Ch") Error in object$terms : >> $ operator not defined for this S4 class > > > Your suggestin would be of a greatl help to me, > Martin > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >