[R-sig-ME] Binomial GLMM vs GLM question
Ken Beath
kjbeath at kagi.com
Fri May 16 04:36:41 CEST 2008
> Dear Dr. Bates and other LMER experts,
> I am admittedly entry level in my R and mixed-model knowledge, but
> I'm hoping that someone can help me and also forgive my lack of
> insight. Over 3 years, I monitored survival of 350 egg masses at two
> ponds. I thus have one continuous variable (rainfall) and two discrete
> variables (year and pond). My response variable, mortality, is coded as
> a two column matrix featuring eggs survived and eggs dead. I'm primarily
> interested in the effect of rain on survival, but also if rain has
> different impacts at the different ponds and how much survival varied
> over the three years. Originally, I though I could tackle this with a
> binomial GLM, but do I need a binomial GLMM instead, as rainfall and
> year would be random and pond fixed? The problem with this is trying to
> make biological sense out of the results. I've spent the last week
> reading all the past posts about why p-values can't be calculated and
> all that, which I'm fine with. But what can I say about the effects of
> rainfall or year on egg survival from the variance estimates? Also,
> doesn't LMER require that random factors be normally distributed,
> because my rainfall measurements are far from it. Is that a problem?
> Thank you in advance for any advice you can give.
> -Justin Touchon
>
I think your misunderstanding the idea of a random effect. This is
something that is unobserved, causing correlation within a group. In your
data this might be year or pond but definitely not rainfall which is
simply a covariate. You have more than one measurement on a pond and more
than one for each year, so it is likely that there will be correlation
between them and one way of dealing with this is a random effect. The
alternative is to use a fixed effects model. In your case, there are only
2 and 3 groups, so a fixed effects model is the best approach, so a GLM is
appropriate. If there were say 20 ponds, a random effects model would be
much more suitable.
Ken
> My model and output are as follows:
>
> > LMER.1<-lmer(mort~Pond + (Pond|total_rainfall) + (1|Year),
> family=binomial, data= FieldData0305)
>
> > summary(LMER.1)
> Generalized linear mixed model fit using Laplace
> Formula: mort ~ Pond + (Pond | total_rainfall) + (1 | Year)
> Data: FieldData0305
> Family: binomial(logit link)
> AIC BIC logLik deviance
> 7657 7680 -3822 7645
> Random effects:
> Groups Name Variance Std.Dev. Corr
> total_rainfall (Intercept) 21.66535 4.65461
> Pond[T.Ocelot] 6.44297 2.53830 -0.627
> Year (Intercept) 0.74082 0.86071
> number of obs: 350, groups: total_rainfall, 48; Year, 3
>
> Estimated scale (compare to 1 ) 4.603433
>
> Fixed effects:
> Estimate Std. Error z value Pr(>|z|)
> (Intercept) -0.4678 1.0173 -0.4598 0.646
> Pond[T.Ocelot] -0.9831 0.9330 -1.0538 0.292
>
> Correlation of Fixed Effects:
> (Intr)
> Pnd[T.Oclt] -0.648
>
> _______________________________________________
> 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