Skip to content
Prev 12347 / 20628 Next

multilevel analysis with sample weighted data

On 14-08-28 07:01 AM, Rodrigo Travitzki wrote:
It depends a little bit what you want to do/the meaning of the
weights.  I have successfully used weights=varFixed(~I(1/n))
[inverse-variance weighting based on the number of samples per group] in
lme; alternatively, you could use weights=n in lmer (from the lme4
package) to get an equivalent result.

If you want to deal with survey weighting, the story seems to be
considerably more complicated -- I don't claim to understand it, but
Andrew Gelman (a fairly prominent applied Bayesian statistician) claims
that it's "a mess" (to use his phrase).  If the weights represent
probability of inclusion in a survey, I believe he would recommend
model-based inference -- that is, fit an unweighted multilevel
regression model and then use post-stratification/weighting to make
predictions (see http://andrewgelman.com/?s=survey+weights for various
discussion and links to papers).

  good luck,
    Ben Bolker