| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: weights in tabulate, summarize
hi experts,
i want to calculate weighted frequencies for category variables and
weighted means and std for continuous variables.
i used SAS weight statement to get the results and tests, but my boss
wants me to use stata to check the results because the way how SAS
deals with weights is known not as good as stata.
i am provided with a non-response adjusted selection probability in the
data. i wanted to use [pw=myweightvar] but apparently it is not allowed.
i used [aw=myweightvar] and [iw=myweightvar]. the weighted frequencies
are the same, and they are consistent with my results from SAS ouput.
but i can't use chi2 option with the above [aw=] and [iw] statement. I
could get chi2 statistics from SAS though. there must be some way to test
the independence of the distribution in stata in this case. please kindly
advise.
also for continous variables, i used tabulate categoryvar
[aw=myweightvar], summarize(continousvar)
again, pw is not allowed, even iw is not allowed.
i get the same weighted means compared to sas output, but the std is much
much smaller than what i get from sas output. i am wondering why. in
this case, i would trust sas output more because apparently aw is dealing
with averages, and my weights should be treated using pw, which is not
available here. i also need to test the differences over the levels of the
category variable. i don't know how to conduct this test in stata.
please advise.
by the way, i can't use svy commands because i am not provided with psu
and strata information.
thanks much for your help.
Lan
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/