I have a convenience sample that I would like to construct sample weights for by raking up to known population proportions.
Taking a simple example, suppose that the only demographic was gender (variable female) and 50/50. I create a matrix "base_female" using the totals command and the variable _one, which is just = 1.
I think I should be able to do this with a command like: svyset _n [pw=_one], rake(female, totals(base_female))
I've tried a variety of variants.
I continue to get the error message "option rake() invalid."
I believe I've use syntax I'm pulling directly from the stata manual, but perhaps I'm missing something.
Can anyone advise?
Taking a simple example, suppose that the only demographic was gender (variable female) and 50/50. I create a matrix "base_female" using the totals command and the variable _one, which is just = 1.
I think I should be able to do this with a command like: svyset _n [pw=_one], rake(female, totals(base_female))
I've tried a variety of variants.
I continue to get the error message "option rake() invalid."
I believe I've use syntax I'm pulling directly from the stata manual, but perhaps I'm missing something.
Can anyone advise?