[R] Multiple Strata Sampling in R Survey

Owen Gallagher odg4n at virginia.edu
Tue Jul 27 21:27:28 CEST 2010


Hello,

I'm using the package survey, version 3.22-2 in R 2.11.1, on windows
XP, but this isn't a platform issue.

I am trying to calculate some regression and probability proportional
to size (pps) estimates for a dataset I have. The data has 2 strata,
weights, and cluster IDs. However, I can't find a way to use multiple
strata in the svydesign function. Currently, I'm ditching the weights
and using the second strata as a weighting mechanism (outlined below).

surveyDesign<-svydesign(id=~EstID, strata=~strataOne,
weights=~strataTwoMod, data=regressionData, nest=T)

But that really doesn't meet the needs of this project. I've also
tried it with strata=(~strataOne + strataTwo), but that didn't work
either. Does anyone know if its a) possible to do mutiple strata
sampling in R survey, and b) how? I emailed the maintainer a week ago,
but I still haven't heard back.

Thanks,

--
Owen Gallagher
President, Washington Society, Fall 2010
Treasurer, American Parliamentary Debate Association, 2010-2011
Computer Engineering, Class of 2011
School of Engineering and Applied Science, University of Virginia



More information about the R-help mailing list