[R-sig-ME] fixef and lme4

Felix Schönbrodt nicebread at gmx.net
Tue Nov 25 19:07:58 CET 2008


Hi Ben,

maybe you loaded the nlme-library after lme4. In this case the fixef- 
function from lme4 is masked and replaced by the nlme-function with  
the same name.

 > library(nlme)

Attache Paket: 'nlme'


	The following object(s) are masked _by_ .GlobalEnv :

	 corMatrix


	The following object(s) are masked from package:lme4 :

	 BIC,
	 VarCorr,
	 fixef,
	 lmList,
	 ranef

 > fixef(ML.anova)
Fehler in UseMethod("fixef") : keine anwendbare Methode für "fixef"
 >

Just unload nlme and it should work...
detach("package:nlme")

Felix



Am 25.11.2008 um 18:03 schrieb Ben Zuckerberg:

> I can not seem to get the fixef function to work in lme4.  Any  
> suggestions would be very welcome...
>
> >  data(sleepstudy)
>
> >  test<-lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject),  
> sleepstudy)
>
> >  summary(test)
>
> Linear mixed model fit by REML
>
> Formula: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject)
>
>  Data: sleepstudy
>
> AIC  BIC logLik deviance REMLdev
>
> 1754 1770 -871.8     1752    1744
>
> Random effects:
>
> Groups   Name        Variance Std.Dev.
>
> Subject  (Intercept) 627.568  25.0513
>
> Subject  Days         35.858   5.9882
>
> Residual             653.584  25.5653
>
> Number of obs: 180, groups: Subject, 18
>
> Fixed effects:
>
>           Estimate Std. Error t value
>
> (Intercept)  251.405      6.885   36.51
>
> Days          10.467      1.559    6.71
>
> Correlation of Fixed Effects:
>
>    (Intr)
>
> Days -0.184
>
> >  fixef(test)
>
> Error in UseMethod("fixef") : no applicable method for "fixef
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models




More information about the R-sig-mixed-models mailing list