[R-sig-ME] Unable to fit glmer withfamily=binomial(link=identity)

Doran, Harold HDoran at air.org
Wed Aug 19 18:09:23 CEST 2009


Should have added this to offer an example. What you want is possible, but I don't think this is what you really want. But, I've been wrong before.

> (gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), family = gaussian, data = cbpp)) 
Linear mixed model fit by REML 
Formula: cbind(incidence, size - incidence) ~ period + (1 | herd) 
   Data: cbpp 
   AIC   BIC logLik deviance REMLdev
 255.1 267.3 -121.5    246.3   243.1
Random effects:
 Groups   Name        Variance Std.Dev.
 herd     (Intercept) 0.0000   0.0000  
 Residual             5.1254   2.2639  
Number of obs: 56, groups: herd, 15

Fixed effects:
            Estimate Std. Error t value
(Intercept)   4.0667     0.5845   6.957
period2      -2.8524     0.8413  -3.390
period3      -3.0667     0.8413  -3.645
period4      -3.5282     0.8579  -4.113

Correlation of Fixed Effects:
        (Intr) perid2 perid3
period2 -0.695              
period3 -0.695  0.483       
period4 -0.681  0.473  0.473

> (gm2 <- lmer(cbind(incidence, size - incidence) ~ period + (1 | herd), data = cbpp)) 
Linear mixed model fit by REML 
Formula: cbind(incidence, size - incidence) ~ period + (1 | herd) 
   Data: cbpp 
   AIC   BIC logLik deviance REMLdev
 255.1 267.3 -121.5    246.3   243.1
Random effects:
 Groups   Name        Variance Std.Dev.
 herd     (Intercept) 0.0000   0.0000  
 Residual             5.1254   2.2639  
Number of obs: 56, groups: herd, 15

Fixed effects:
            Estimate Std. Error t value
(Intercept)   4.0667     0.5845   6.957
period2      -2.8524     0.8413  -3.390
period3      -3.0667     0.8413  -3.645
period4      -3.5282     0.8579  -4.113

Correlation of Fixed Effects:
        (Intr) perid2 perid3
period2 -0.695              
period3 -0.695  0.483       
period4 -0.681  0.473  0.473 

> -----Original Message-----
> From: r-sig-mixed-models-bounces at r-project.org 
> [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf 
> Of Doran, Harold
> Sent: Wednesday, August 19, 2009 11:59 AM
> To: David Evans; r-sig-mixed-models at r-project.org
> Subject: Re: [R-sig-ME] Unable to fit glmer 
> withfamily=binomial(link=identity)
> 
> I may be missing something here, but why are you using an 
> identity link with binomial outcomes? If there is a reason 
> why, you might as well just use lmer since the identity link 
> is for a normal distribution and that is the distributional 
> assumption used for the errors in that function.
> 
>  
> 
> > -----Original Message-----
> > From: r-sig-mixed-models-bounces at r-project.org
> > [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf 
> Of David 
> > Evans
> > Sent: Wednesday, August 19, 2009 11:03 AM
> > To: r-sig-mixed-models at r-project.org
> > Subject: [R-sig-ME] Unable to fit glmer with
> > family=binomial(link=identity)
> > 
> > Fellow R-users,
> > 
> > I need to estimate the "risk difference" (in epidemiological
> > terminology) for a neighbourhood-level exposure (e.g. 
> > presence of parks) with a binary outcome adjusted on 5 or so 
> > covariables. Study participants are clusted by 
> neighbourhood .  I was 
> > hoping to use a generalized linear mixed model with the code:
> > 
> > mod  <-  glmer(outcome ~ exposure + (1 | neighbourhood), 
> > family=binomial(link=identity), data=rec)
> > 
> > but the identity link is not available for the binomial family with 
> > glmer (or for glmmPQL).  Is there any way to do this with 
> lme4 or is 
> > there another package in R which could fix my problem?
> > 
> > I'd be very grateful for any help.
> > 
> > David.
> > 
> > --
> > David Evans
> > UMR-S 707 Inserm - Université Pierre et Marie Curie - Paris 
> 6 Faculté 
> > de Médecine Saint-Antoine 27, rue Chaligny
> > 75571 Paris cedex 12
> > 
> > _______________________________________________
> > R-sig-mixed-models at r-project.org mailing list 
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> > 
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 




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