Hi Ewart,

Thanks for the quick reply. I've run the model using "sitc". But the
variance is still zero.

dat$sitc <- scale(dat$sit)

> mod8 <- lmer(ars1 ~ sitc + dive + (1|bird), data=dat, family=binomial)

> summary(mod8)
Generalized linear mixed model fit by the Laplace approximation
Formula: ars1 ~ sitc + dive + (1 | bird)
   Data: dat
   AIC   BIC logLik deviance
 159.4 171.7 -75.71    151.4
Random effects:
 Groups Name        Variance Std.Dev.
 bird   (Intercept)  0        0
Number of obs: 160, groups: bird, 25

Fixed effects:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)  -1.5423     0.3705  -4.163 3.14e-05 ***
sitc          1.2913     0.2495   5.175 2.28e-07 ***
dive          1.3076     0.4374   2.990  0.00279 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
     (Intr) sitc
sitc -0.156
dive -0.827  0.005


2012/5/22 Ewart Thomas <ethomas@stanford.edu>

> julia, while doug bates is right in noting that the 0 estimate suggests
> that var(intercept) is truly 0 (and can be omitted), i think your result is
> suspicious (not wrong).
>
> try centering 'sit':  sitc = scale(sit)
>
> then use sitc instead of sit in mod6.  the meaning of 'intercept' for each
> bird has changed: it is now a bird's average response (on the logit(p)
> scale) when the bird happens to have it's 'sit' value = the sample mean of
> 'sit'.  you may know how best to interpret such 'intercepts'.
>
> good luck!
> ewart
>
> On May 21, 2012, at 6:07 PM, Julia Sommerfeld wrote:
>
> > Dear list,
> >
> > I'm running a lmer (package lme4) with a binomial error distribution and
> > "bird" as the random effect (160 observations of 25 birds). The response
> > variable "ars1" is coded as 0, 1.
> > The fixed effect "sit" is numerical and "dive" is categorical (0, 1).
> >
> > What puzzles me a little is that the a variance and sd of the random
> effect
> > is ZERO. Same question has been posted before and Douglas Bates answer
> was:
> >
> > "No, an estimate of zero is not suspicious.  It is simply an indication
> >
> > that the variability between individuals is not significantly larger
> > than what one would expect from the random variability in the
> > response."
> >
> >
> > While another answer suggested that the model was "wrong":
> >
> >
> > "A zero estimate of a variance possibly indicates the model is wrong."
>  This
> > wrong model seemed to be related to a negative covariation of one of the
> > fixed effects ?
> >
> >
> >
> > My simplified model is:
> >
> > mod6 <- lmer(ars1 ~ sit + dive + (1|bird), data=dat, family=binomial)
> >
> >> summary(mod6)
> > Generalized linear mixed model fit by the Laplace approximation
> > Formula: ars1 ~ sit + dive + (1 | bird)
> >   Data: dat
> >   AIC   BIC logLik deviance
> > 159.4 171.7 -75.71    151.4
> > Random effects:
> > Groups Name        Variance Std.Dev.
> > bird   (Intercept)  0        0
> > Number of obs: 160, groups: bird, 25
> >
> > Fixed effects:
> >            Estimate Std. Error z value Pr(>|z|)
> > (Intercept)  -0.3615     0.4037  -0.895  0.37059
> > sit           0.7492     0.1448   5.175 2.28e-07 ***
> > dive          1.3076     0.4374   2.990  0.00279 **
> > ---
> > Signif. codes:  0 Ś***‚ 0.001 Ś**‚ 0.01 Ś*‚ 0.05 Ś.‚ 0.1 Ś ‚ 1
> >
> > Correlation of Fixed Effects:
> >     (Intr) sit
> > sit   0.422
> > dive -0.756  0.005
> >>
> >
> >
> > Based on the summary output (zero variance and sd) and the two plots
> below,
> > I'm inclined to believe that in fact my random effect bird does not
> account
> > for any of the variance in the model. I.e., that there is no significant
> > variability between birds that I should account for.
> >
> > *QUESTION: Could I be overlooking something or is it justified to run a
> glm
> > without the random effect bird instead of a lmer?*
> >
> > Thank you!
> >
> > Best regards, Julia
> >
> >
> > dotplot(ranef(mod6, postVar=TRUE))
> >
> >
> >
> > qqnorm(unlist(ranef(mod6)), main="normal qq-plot, random effects")
> > qqline(unlist(ranef(mod6))) # qq of random effects
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>


-- 
Julia Sommerfeld - PhD Candidate
Institute for Marine and Antarctic Studies
University of Tasmania
Private Bag 129, Hobart
TAS 7001

Phone: +61 477 289 301
Email: julia.somma@gmx.de
Julia.Sommerfeld@utas.edu.au

	[[alternative HTML version deleted]]

