Skip to content
Prev 4123 / 7420 Next

Unbalanced data and random effects

On Wed, Oct 16, 2013 at 6:20 PM, Chris Howden
<chris at trickysolutions.com.au> wrote:
I was thinking "Mixed Effects Models and Extensions in Ecology with R", but now
that I search through Zuur in Google books there appears to be no mention of
either "partial pooling" or "shrinkage" (I don't have the book on
hand).  It's not mentioned
in the index either...  I recommended  Zuur because I know a lot of
ecologists use it
and shrinkage is such a basic and useful topic I expected it to be covered.

It's page 477 in Gelman and Hill.  Since I stuck my foot in it by
recommending Zuur
without checking: the basic idea is that if you have a data set with
unbalanced group sizes and you just call everything one group, you could get an
estimated group mean, MU.  If you use fixed effects and you estimate
one mean per
group(mu_1, mu_2, ..., mu_k), and the means for the small groups will be poorly
estimated (large standard errors).  If you use a random effects model,
you estimate
one mean per group but you also constrain the group means (mu*_1,
mu*_2, ..., mu*_k)
to come from a normal distribution (with an estimated mean, MU*, and
variance) which has two
effects important for interpretation: 1) groups with fewer
observations will mostly be
represented by the overall mean (mu*_1 is closer to MU* than mu_1 is
to MU, and the
effect is more extreme for groups with small sample size); and 2) this
effect is even more pronounced
in groups with large deviations from MU*.

You can get a feel for how much this matters by simulating/fitting
some data similar
to your data in R (Kery's "Introduction to WinBUGS for ecologists"
does a lot of this
kind simulation).  The terms used to describe these effects are
"shrinkage" and "partial pooling",
since complete pooling is what you get when you disregard the
divisions.  You can also
calculate how much pooling is being done directly (Gelman and Hill, pg. 477):

mu*_j = w_j x MU* + (1-w_j) * mean(observations in group j)

w_j = 1- (estimated variance of random effect) / (estimated variance
of random effect + within-group variance/group size)

Where w_j tells you how much that groups estimate is pooled towards the mean.

That's the short and sloppy version, but the discussion in Gelman is
good, sorry for the confusion,
maybe somebody else knows for sure where/if Zuur discusses this?

Krzysztof