I considered that. I disaggregated the region random effect from 6 to 18
(the latter of which approximates the World Bank's region classification).
I'm still encountering the same curious issue.
Random effects:
Groups Name Variance Std.Dev. Corr
country:wave (Intercept) 0.1530052 0.39116
country (Intercept) 0.3735876 0.61122
wbregion (Intercept) 0.0137822 0.11740
x1 0.0009384 0.03063 -1.00
x2 0.0767387 0.27702 -1.00 1.00
Number of obs: 212570, groups: country:wave, 143; country, 82; wbregion,
18
For what it's worth: the model estimates fine. The results are intuitive
and theoretically consistent. They also don't change if I were to remove
that region random effect. I'd like to keep the region random effect (with
varying slopes) in the model. I'm struggling with what I should think about
the perfect correlations.
On Tue, Jul 14, 2015 at 9:07 PM, Jake Westfall <jake987722 at hotmail.com>
wrote:
Hi Steve,
I think the issue is that estimating 3 variances and 3 covariances for
regions is quite ambitious given that there are only 6 regions. I think
it's not surprising that the model has a hard time getting good estimates
of those parameters.
Jake
Date: Tue, 14 Jul 2015 20:53:01 -0400
From: steven.v.miller at gmail.com
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] Perfectly correlated random effects (when they
Hi all,
I'm a long-time reader and wanted to raise a question I've seen asked
before about correlated random effects. Past answers I have encountered
this listserv explain that perfectly correlated random effects suggest
model overfitting and variances of random effects that are effectively
and can be omitted for a simpler model. In my case, I don't think
what is happening here, though I could well be fitting a poor model in
glmer.
I'll describe the nature of the data first. I'm modeling
survey data for countries across multiple waves and am estimating the
region of the globe as a random effect as well. I have three random
(country, country-wave, and region). In the region random effect, I am
allowing country-wave-level predictors to have varying slopes. My
is whether some country-wave-level contextual indicator can have an
effect (as a fixed effect), the effect of which can vary by region. In
other words: is the effect of some country-level indicator (e.g.
unemployment) in a given year different for countries in Western Europe
than for countries in Africa even if, on average, there is a positive
negative association at the individual-level? These country-wave-level
predictors that I allow to vary by region are the ones reporting
correlation and I'm unsure how to interpret that (or if I'm estimating
model correctly).
I should also add that I have individual-level predictors as well as
country-wave-level predictors, though it's the latter that concerns me.
Further, every non-binary indicator in the model is standardized by two
standard deviations.
For those interested, I have a reproducible (if rather large) example
below. Dropbox link to the data is here:
In this reproducible example, y is the outcome variable and x1 and x2
two country-wave-level predictors I allow to vary by region. Both x1
are interval-level predictors that I standardized to have a mean of
and a standard deviation of .5 (per Gelman's (2008) recommendation).
I estimate the following model.
summary(M1 <- glmer(y ~ x1 + x2 + (1 | country) + (1 | country:wave) +
x1 + x2 | region), data=subset(Data), family=binomial(link="logit")))
The results are theoretically intuitive. I think they make sense.
I get a report of perfect correlation for the varying slopes of the
random effect.
Random effects:
Groups Name Variance Std.Dev. Corr
country:wave (Intercept) 0.15915 0.3989
country (Intercept) 0.32945 0.5740
region (Intercept) 0.01646 0.1283
x1 0.02366 0.1538 1.00
x2 0.13994 0.3741 -1.00 -1.00
Number of obs: 212570, groups: country:wave, 143; country, 82; region,
What should I make of this and am I estimating this model wrong? For
it's worth, the dotplot of the region random effect (with conditional
variance) makes sense and is theoretically intuitive, given my data. (
http://i.imgur.com/mrnaJ77.png)
Any help would be greatly appreciated.
Best regards,
Steve
[[alternative HTML version deleted]]