Dear list,
I would like to use bsweights to generate bootstrap replicate weights, and then use a program written by myself to calculate point estimates and confidence intervals. How should I combine the original sampling weight in my data with the replicate weights generated by bsweights? Should I multiply them (as exemplified below)? All the examples in the help file use the -bsweights- / -bs4rw- combo, which automatically incorporate both the original sampling weight in the data and the replicate weights without showing the way how they are combined. I am asking this question because my analysis has no ready-made command in Stata, so it is not easy for me to use the -bsweights- / -bs4rw- combo. Thank you!
Bsweights is contributed by Stanislav Kolenikov: Kolenikov, S. (2010). Resampling Variance Estimation for Complex Survey Data. The Stata Journal, 10(2), 165–199. https://doi.org/10.1177/1536867X1001000201
I would like to use bsweights to generate bootstrap replicate weights, and then use a program written by myself to calculate point estimates and confidence intervals. How should I combine the original sampling weight in my data with the replicate weights generated by bsweights? Should I multiply them (as exemplified below)? All the examples in the help file use the -bsweights- / -bs4rw- combo, which automatically incorporate both the original sampling weight in the data and the replicate weights without showing the way how they are combined. I am asking this question because my analysis has no ready-made command in Stata, so it is not easy for me to use the -bsweights- / -bs4rw- combo. Thank you!
Code:
use http://www.stata-press.com/data/r11/nhanes2, clear generate cstrata = floor(sqrt(2*strata-1)) egen upsu = group(strata psu) svyset upsu [pw=finalwgt], strata(cstrata) bsweights bw, reps(100) n(-1) seed(10101) dots gen newweight1=finalwgt*bw1 gen newweight2=finalwgt*bw2 ...