Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st:-expand- to adjust according to the sampling weight


From   Steven Samuels <[email protected]>
To   [email protected]
Subject   Re: st:-expand- to adjust according to the sampling weight
Date   Mon, 20 Dec 2010 17:06:33 -0500

Without more details, we cannot advise you: What command, exactly? Does it take frequency weights? What is the study design? (panel, cross-ectional?) Were there clusters? strata? What's the purpose of your analysis?

Steve
[email protected]


On Dec 20, 2010, at 8:29 AM, Amanda Fu wrote:

Dear Statalisters,

I have a question about how to use expand to adjust sampling weight
for the command that pw is not allowed to use. I know previous
discussion from this link
http://mail.google.com/mail/?hl=en&shva=1#search/expand+weight/ 12b6754ba71c32bd
talks some points about expand. But I am still not sure how to use
it.

Suppose I have there variables in the data set:X,Y, and sampling
weight. In order to use stata command that does not allow to use pw, I
am thinking to expand the data set according to weight.

------------------------------
X             Y            sweight
1              2             10
2              2.5           2
.....................
-----------------------------
Is it correct if I use
. gen tt_weight=sum(weight)
. expand sweight/tt_weight                          ?

Thanks for your help!

Sincerely,
Amanda
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index