I have a special case of a binomial glmer and I can't figure out how to properly model it. I have a random factor (1|Species) to account for differences in species. My response variable consists of "establishment limitation values," which in the literature is calculated as 1 - (# of sites in which seedlings establish / # of sites in which seeds were found). Values range from 0 - 1. There are 20 sites in total, so I tried using weights set to 20. But (I assume) since values are not divided by 20, this is not working. I tried setting weights to the # of sites in which seeds were found, but this doesn't work either. I tried having a column of successes (the number of sites where seedling establishment occurred) and failures (the number of sites where seeds were found but no establishment occurred). This worked, but I am afraid I am no longer modeling establishment limitations values, but something else, and I don't know how I would explain in my paper that I couldn't model the actual limitation values, which is an important part of my work. I am trying to model the effect of my treatment, seed size and seed dispersal mechanism (Animal vs Wind) on limitation values. For now, excluding dispersal, my formula is:

model1<-glmer(Est.Limit~Treatment+log(Size)+(1|Species), data=Limitdr.Est, family=binomial, weights=Weight)

I am trying to use the Gauss-Hermite quadrature algorithm (if it's not overdispersed), but I am leaving that out for now until I get this figured out.

How can I model these proportion values?

When I try the above formula, I get this weird outcome:

enter image description here

Here is a link to my data as an excel file: Limitdr.est excel file

I tried to post as a CSV but I don't have a sufficient reputation for two links.

Let me know if you need any information. I am really looking forward to any suggestions!

  • $\begingroup$ "Establishment limitation values:" 1 - $\frac{ \text{# of sites in which seedlings establish}}{\text{# of sites in which seeds were found}}$ = $\frac{ \text{# of sites in which seedlings didn't establish}}{\text{# of sites in which seeds were found}}$ sure looks like a proportion to me, with a "success" being a site in which a seedling didn't establish in terms of the two-column matrix formulation of the binomial model. $\endgroup$
    – Andrew M
    May 25, 2016 at 21:26
  • $\begingroup$ Related: stats.stackexchange.com/questions/87956 $\endgroup$
    – amoeba
    Sep 5, 2016 at 10:49

1 Answer 1


In my opinion, you are modeling the establishment limitation, you just made a mistake with the weights argument. From R help:

For the binomial and quasibinomial families the response can be specified in one of three ways:

As a factor: ‘success’ is interpreted as the factor not having the first level (and hence usually of having the second level).

As a numerical vector with values between 0 and 1, interpreted as the proportion of successful cases (with the total number of cases given by the weights).

As a two-column integer matrix: the first column gives the number of successes and the second the number of failures.

Your data clearly fits in the second case, but you have to supply the total number of cases to weights.

The following code works for me:

model1 <- glmer(Est.Limit ~ Treatment + log(Size) + (1|Species),
                data    = Limitdr.Est,
                family  = "binomial",
                weights = Seed.sites)

the result:

> summary(model1)
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
 Family: binomial  ( logit )
Formula: Est.Limit ~ Treatment + log(Size) + (1 | Species)
   Data: x
Weights: Seed.sites

     AIC      BIC   logLik deviance df.resid 
   110.3    117.8    -50.2    100.3       28 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.7705 -0.4858 -0.1659  0.6247  2.0272 

Random effects:
 Groups  Name        Variance Std.Dev.
 Species (Intercept) 4.519    2.126   
Number of obs: 33, groups:  Species, 11

Fixed effects:
                    Estimate Std. Error z value Pr(>|z|)    
(Intercept)           0.9418     0.8370   1.125 0.260523    
TreatmentIsland       0.5172     0.3926   1.317 0.187700    
TreatmentPlantation   1.6060     0.4670   3.439 0.000583 ***
log(Size)            -1.0333     0.3793  -2.724 0.006442 ** 
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) TrtmnI TrtmnP
TrtmntIslnd -0.230              
TrtmntPlntt -0.189  0.466       
log(Size)   -0.479 -0.041 -0.100

Hope this helps, Cheers!

  • $\begingroup$ Donlelek, thank you this does help! I am realizing now that the problem I was seeing occurs when I add in the "Succession" category as: model2 <- glmer(Est.Limit ~ Treatment + log(Size) + Succession +(1|Species), data = Limitdr.Est, family = "binomial", weights = Seed.sites) $\endgroup$
    – Sylvia
    May 26, 2016 at 13:19
  • $\begingroup$ I get this error message: "Warning messages: 1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : unable to evaluate scaled gradient 2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model failed to converge: degenerate Hessian with 1 negative eigenvalues But this only occurs with Succession included, and the significance of terms are different. Things are fine with Dispersal and every other combo. I am trying to start from a maximal model and drop non-significant terms to get the best model. Any idea what's wrong with Dispersal? $\endgroup$
    – Sylvia
    May 26, 2016 at 13:28
  • $\begingroup$ Hi @Sylvia, I'm glad that my answer was useful. The problem with Succession is that you don't have any failures. If you want you can check yourself by adding one more observation with a failure. Cheers $\endgroup$
    – donlelek
    May 26, 2016 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.