[R-sig-ME] lmer and log link

Douglas Bates bates at stat.wisc.edu
Wed Oct 31 19:29:26 CET 2012


On Wed, Oct 31, 2012 at 1:18 PM, Hugh Sturrock <hughsturrock at hotmail.com> wrote:

> Hello all,

> I am running a lmer model with two random effect levels, household nested in village, with two categorical predictors and a binomial outcome. I would like to obtain risk ratios and so am using the term family=binomial(link=log). However, using this link doesn’t allow the model to converge properly and I get the following message:

> Error in
> mer_finalize(ans) :
>
>   mu[i]
> must be in the range (0,1): mu = 18.3133, i = 166

> As I understand it from posts elsewhere, this is due to the fact that one or more observations producing a linear predictor that, when mapped to a predicted probability, falls outside the admissible range of [0,1]. Does anyone know of a way to overcome this?Thank you!Hugh

I hate to sound facetious but the simple solution is to use a link
such as the logit or probit or cloglog or ... that restricts the value
of inverse link function to the interval [0,1].  It is unusual to use
the log link for a binomial response unless the values of the linear
predictor stay very small, in which case the log link is almost the
same as the logit link.



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