November 5, 2012

Multi-stage sampling together with hierarchical/ mixed effects models: which packages?

Dear R experts,

I sent this question to the r-help list but didn’t get much response, probably because it is more of a stats question. But as this blog is syndicated on r-bloggers I thought I would try it again here on this blog. If I am barking up the wrong tree, feel free to flame.

When I have to analyze educational datasets with samples of children from samples of schools and which include sampling weights, I use the survey package e.g. to calculate means and confidence intervals or to do a linear model. But this kind of design (e.g. children nested inside schools) also as I understand it requires looking at the mixed effects. But this isn’t possible using the survey package. Perhaps I am better advised to use nlme - I guess I could use the sample weights as predictors in nlme regressions but I don’t think that is correct.

It seems that this kind of design (in fact any stratified survey sample which includes nested levels) needs analysing from both perspectives - (survey weights and mixed effects) at once - but the packages of choice for each of these perspectives, survey and nlme, each don’t seem to have slots for the other perspective.


Previous post
Horizon plots with ggplot (not) The Timely Portfolio blog via R-bloggers has recently published some interesting entries about the value of horizon plots for visual comparison of a
Next post
RStudio and TeXworks working great together Just now writing a reproducible report in R using RStudio on Ubuntu. So the source is a .Rnw file and I am compiling it with knitr. For the

This blog by Steve Powell is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, syndicated on r-bloggers and powered by Blot.
Privacy Policy