I am having a problem extracting from "mer" objects. I have constructed my problem using existing datasets. Using the following commands: require(lme4) fm1 <- lmer(Yield ~ 1 + (1 | Batch), Dyestuff) fixef(fm1) I get the following error message: "Error in UseMethod("fixef") : no applicable method for "fixef"" I know that "fixef" is in lme4 and UseMethod is in "base", so I am stuck trying to sort out this problem. This problem applies to all extraction commands from mer objects. Any help is greatly appreciated, I am new to using R. Chris R. (Seattle) [[alternative HTML version deleted]]
Chris I think your problem is in the model. In his model, it seems that their fixed effects are the averages. Is that so? M.Sc Ivan Bezerra Allaman Zootecnista Doutorando em Produção Animal/Aquicultura - UFLA email e msn - ivanalaman@yahoo.com.br Tel: 35/3822-8117; 35/9925-6428 ________________________________ De: Chris Ramsborg <ramsborg@yahoo.com> Para: r-help@r-project.org Enviadas: Segunda-feira, 18 de Janeiro de 2010 18:20:22 Assunto: [R] Problem extracting from mer objects I am having a problem extracting from "mer" objects. I have constructed my problem using existing datasets. Using the following commands: require(lme4) fm1 <- lmer(Yield ~ 1 + (1 | Batch), Dyestuff) fixef(fm1) I get the following error message: "Error in UseMethod("fixef") : no applicable method for "fixef"" I know that "fixef" is in lme4 and UseMethod is in "base", so I am stuck trying to sort out this problem. This problem applies to all extraction commands from mer objects. Any help is greatly appreciated, I am new to using R. Chris R. (Seattle) [[alternative HTML version deleted]] ____________________________________________________________________________________ [[elided Yahoo spam]] [[alternative HTML version deleted]]
Chris Ramsborg <ramsborg <at> yahoo.com> writes:> I am having a problem extracting from "mer" objects.? > ? > I have constructed my problem using existing datasets. > ? > Using the following commands: > ? > require(lme4) > fm1 <- lmer(Yield ~ 1 + (1 | Batch), Dyestuff) > fixef(fm1) > > I get the following error message: > "Error in UseMethod("fixef") : no applicable method for "fixef"" > ?[FWIW, questions on nlme/lmer might better be directed to r-sig-mixed-models at lists.r-project.org] Do you have the nlme package loaded simultaneously (you shouldn't) ? I can get almost (but not quite) the same error message by doing the following:> require(lme4)Loading required package: lme4 Loading required package: Matrix Loading required package: lattice> fm1 <- lmer(Yield ~ 1 + (1 | Batch), Dyestuff) > fixef(fm1)(Intercept) 1527.5> > library(nlme)Attaching package: 'nlme' The following object(s) are masked from package:lme4 : BIC, fixef, lmList, ranef, VarCorr> fixef(fm1)Error in UseMethod("fixef") : no applicable method for 'fixef' applied to an object of class "mer"