lme4 upgrade produces error message Error in `[[<-.data.frame`(`*tmp*`, i, value = integer(0))

前端 未结 1 1057
太阳男子
太阳男子 2021-01-16 11:31

I have constructed a generalized mixed linear model with lmer (lme4) last week which worked fine:

fit<-lmer(dat$presence~log(dat$SIZE_strict)*dat$Troph_le         


        
相关标签:
1条回答
  • 2021-01-16 12:05

    This is a buglet in the new version of lme4 (to be fixed in an upcoming patch release) that requires grouping variables to be findable within the data frame specified by the data argument. In general things will work more smoothly (and your code will be easier to read) if you use the data argument and eschew using variables of the form dat$var, for example:

    fit <- glmer(presence~log(SIZE_strict)*Troph_level+log(HAB500EXCL_strict+1)+
      (1|dataset), family=poisson, data=dat)
    
    0 讨论(0)
提交回复
热议问题