Dear all,
Hopefully, you can help me calculating confidence intervals for weighted means using post-stratification weights.
I am working with cross-sectional individual-level survey data in Stata 15 on Windows.
I have calculated post-stratification weights using Nicholas Winter's -survwgt rake- . Now, I would like to calculate weighted means by age and sex based on these post-stratification weights, including confidence intervals. Actually, I have calculated several sets of post-stratification weights (let's call them poststratificationweight_1 and poststratificationweight_2) and would like to compare means based on them. Hence, I would prefer a method that does not require for the data to be collapsed.
To calculate the weighted means, I simply used the _gwteman package (ssc inst _gwtmean) and typed:
Yet I do not know how to calculate the responding confidence intervals. Would it be possible to bootstrap even though I want to use weights? If so, how could I do that in Stata? Also, I read that one could use the delta-method. I read up on this method, but don't know how to apply it to my specific problem.
Thank you for your help!
Best,
Stephanie
Hopefully, you can help me calculating confidence intervals for weighted means using post-stratification weights.
I am working with cross-sectional individual-level survey data in Stata 15 on Windows.
I have calculated post-stratification weights using Nicholas Winter's -survwgt rake- . Now, I would like to calculate weighted means by age and sex based on these post-stratification weights, including confidence intervals. Actually, I have calculated several sets of post-stratification weights (let's call them poststratificationweight_1 and poststratificationweight_2) and would like to compare means based on them. Hence, I would prefer a method that does not require for the data to be collapsed.
To calculate the weighted means, I simply used the _gwteman package (ssc inst _gwtmean) and typed:
Code:
egen x_mean_1 = wtmean(x), by(sex age) weight(poststratificationweight_1) egen x_mean_2 = wtmean(x), by(sex age) weight(poststratificationweight_2)
Thank you for your help!
Best,
Stephanie
Comment