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

November 5, 2012

(This article was first published on socialdatablog » R, and kindly contributed to R-bloggers)

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.

If someone could put me on the right track I could be more specific with reproducible examples etc

Best Wishes
Steve Powell

To leave a comment for the author, please follow the link and comment on their blog: socialdatablog » R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Mango solutions

RStudio homepage

Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training



CRC R books series

Contact us if you wish to help support R-bloggers, and place your banner here.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)