[R] Subpopulations in Complex Surveys
Thomas Lumley
tlumley at u.washington.edu
Sun Feb 23 19:18:03 CET 2003
On Wed, 19 Feb 2003 TyagiAnupam at aol.com wrote:
> Hi,
> is there a way to analyze subpopulations (e.g. women over 50, those who
> answered "yes" to a particular question) in a survey using Survey package?
> Other packages (e.g. Stata, SUDAAN) do this with a subpopulation option to
> identify the subpopulation for which the analysis shoud be done. I did not
> see this option in the Survey package. Is there another way to do this?
>
Not directly.
This only really matters for svymean. For the regression models it's just
a convenience as you can specify a model that has an interaction with the
subpopulation indicator to get estimates and standard errors in the
subpopulation.
For svymean you can use a regression model too:
Instead of a hypothetical svymean(~x, design=d, subpop=race==2) do
svyglm(x~I(race==2)+0, design=d)
I need to work out if there's a general way to handle subpopulations or
whether it needs to be coded on a case by case basis.
-thomas
More information about the R-help
mailing list