An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20121031/8b028031/attachment.pl>
lmer and log link
3 messages · Hugh Sturrock, Douglas Bates, David Winsemius
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.
On Oct 31, 2012, at 11:18 AM, Hugh Sturrock 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).
Couldn't you use Poisson errors with a log link. I would think that should give you risk ratios and be a canonical link-error pairing.
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 Hugh Sturrock
David Winsemius, MD Alameda, CA, USA