Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: how to weight


From   Richard Williams <Richard.A.Williams.5@nd.edu>
To   statalist@hsphsun2.harvard.edu, <statalist@hsphsun2.harvard.edu>
Subject   Re: st: how to weight
Date   Wed, 10 Mar 2004 13:44:46 -0500

At 01:29 PM 3/10/2004 -0500, Lijun Song wrote:
Hi All,

I just transfered one data from spss into stata. The original spss data
ever are weighted. After transference, however, the stata data are not
weighted. How to weight the resultant stata data, then?
Type -help weight-. In SPSS, you might have

weight by wgt
regression....

In Stata,

reg y x [fw = wgt]

For better or for worse, SPSS lets you give the weight command once and it then holds for all subsequent procedures; Stata makes you keep on repeating the weighting as a parameter on your commands (unless you happen to be using the svy commands). But, Stata's weighting features are more powerful than what is available in SPSS.

Also, depending on what kinds of weights you are using, the -expand- command can be used to expand the data set. This is handy if, say, you are analyzing data that has been collapsed into a table, and the weights represent the cell frequencies.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: Richard.A.Williams.5@ND.Edu
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

*
* 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/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index