# Warning message with non-integers in glmer

When I run:

model1 <- glmer(Avg_egg_mass ~ Treatment + Alt + Treatment:Alt + (1|Obs), family = poisson(link=log), data = dframe1)

the output is:

"There were 50 or more warnings (use warnings() to see the first 50)

warnings() Warning messages: 1: In (function (fr, X, reTrms, family, nAGQ = 1L, verbose = 0L, ... :non-integer x = 1.010000" and it goes on in this fashion for all my data in that column.

Do I have to make this an integer?

The summary of model2 then says:

"Error in diag(vcov(object, use.hessian = use.hessian)) : error in evaluating the argument 'x' in selecting a method for function 'diag': Error in eigen(V.hess, symmetric = TRUE, only.values = TRUE) : infinite or missing values in 'x'"

Can anybody help?

• In general it wouldn't seem sensible to model an average egg mass with a Poisson distribution (which only applies to a unitless count variable). Perhaps you intended to use a log-Normal (lmer(log(Avg_egg_mass) ~ ...) or a Gamma model? Oct 9 '14 at 13:35
• Yes thanks, I just noticed that and changed it back to gaussian - the error message has now disappeared. Now I get this instead "Error in checkNlevels(reTrms\$flist, n = n, control) : number of levels of each grouping factor must be < number of observations" Any ideas? Oct 9 '14 at 13:55
• that's because you shouldn't (generally) use an observation-level random effect with a Gaussian -- it's confounded with the residual error term. If that was your only grouping variable, then you don't even really need a mixed model Oct 9 '14 at 14:09
• Thanks alot! It works when I leave that variable away and add a different random effect with a lesser number of levels. Oct 9 '14 at 14:37

In this case it would make more sense to use a log-Normal (i.e., by transforming the response and then fitting a linear mixed model, lmer(log(Avg_egg_mass) ~ ...) or a Gamma model (the former, log-Normal approach is easier; I would generally only recommend a Gamma model in cases where there is a strong mechanistic or cultural reason to use one).