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
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)