1

I am trying to run a multi-level model to account for the fact that votes for a country's presidential elections may be nested within groups (depending of voters' mother tongues, places of residence etc.). In order to do so, I use the glmer function of the lme4 package.

m1<-glmer(vote_DPP ~ 1 + (1 | county_city), 
          family = binomial(link="logit"), data = d3)

Here, my vote variable is binary, representing whether people vote for a given party (1) or not (0). Since I believe results may change depending on people's state of residence, I want to allow intercepts to vary across states. However, I see no variation of intercept when I run my code.

Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
 Family: binomial  ( logit )
Formula: vote_DPP ~ 1 + (1 | county_city)
   Data: d3
      AIC       BIC    logLik  deviance  df.resid 
1746.7918 1757.2001 -871.3959 1742.7918      1343 
Random effects:
 Groups      Name        Std.Dev.
 county_city (Intercept) 0.2559  
Number of obs: 1345, groups:  county_city, 17
Fixed Effects:
(Intercept)  
     0.5937

What puzzles me here is the complete absence of variance column. I have seen other forums on the web regarding problems with variance = 0, but I cannot seem to find anything about the complete disappearance of this column (which makes me think it's probably something very simple I missed). First time posting in here, and quite a beginner in R and Stats, so any help would be appreciated :)

Mikokorico
  • 11
  • 1

1 Answers1

0

If you're concerned about seeing if the variance is zero, that's equivalent to seeing if the standard deviation is zero (similarly for "is (std dev/variance) small, although in this case they will be on different scales"). Furthermore, if the std dev/variance are zero or nearly zero you should get a "singular fit" message as well.

@Roland's comment is correct that summary() will print both the standard deviation and the variance by default. You can ask for both (or either) in the output of print() as well by specifying the ranef.comp (random effect component) argument:

library(lme4)
gm1 <- glmer(incidence/size ~ period + (1|herd),
      data = cbpp,
      weight = size,
      family = binomial)
print(gm1, ranef.comp = c("Std.Dev.", "Variance"))
## ...
## Random effects:
##  Groups Name        Std.Dev. Variance
##  herd   (Intercept) 0.6421   0.4123  
## ...

(You can similarly modify which components are shown in the summary printout: for example if you only want to see the variance, you can specify print(summary(gm1), ranef.comp = c("Variance")).)

For a bit more context: the standard deviation and variance are essentially redundant information (the standard error of the estimates of the random effects are not shown because they can be unreliable estimates of uncertainty in this case). Which form is more useful depends on the application: standard deviations are easier to compare to the corresponding fixed effects, variances can sometimes be used to make conclusions about partitioning of variance across effects (although doing this is more complicated than in the classic linear, balanced ANOVA case).

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453