Hi everyone,
I need to calculate some general regression estimator (GREG) survey weights and save them as a variable. As far as I know there aren't any packages that would allow me to do that in Stata (unlike say ipfweight for raked weights). I do know though that you can calculate them using svyset. What I can't figure out is how to save the weights that get produced (or whether that is even possible).
To give a really simple made up example of what I want to do, I want to save the weights that get used in the weighted mean estimate below as a variable:
Thanks for any help!
Chris
I need to calculate some general regression estimator (GREG) survey weights and save them as a variable. As far as I know there aren't any packages that would allow me to do that in Stata (unlike say ipfweight for raked weights). I do know though that you can calculate them using svyset. What I can't figure out is how to save the weights that get produced (or whether that is even possible).
To give a really simple made up example of what I want to do, I want to save the weights that get used in the weighted mean estimate below as a variable:
Code:
set obs 1000 gen x = rbinomial(1,.5) svyset, regress(x, totals(_cons=10000 x=6000)) svy: mean x
Chris
Comment