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

RE: st: how to compare weight and unweighted statistics


From   "Sayer, Bryan" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: how to compare weight and unweighted statistics
Date   Mon, 23 Sep 2002 09:55:04 -0400

There is an article specifically addressing weighted vs. non-weighted
estimates for the NSFH.  I think it is by Bumpass and Sweet, but I'm not
positive.  I happen to disagree with them.  I think you should always
account for the sample design.  But the documentation for the sample design
of the NSFH is extremely weak.

Bryan Sayer
Statistician, SSS Inc.
[email protected]


-----Original Message-----
From: Ulrich Kohler [mailto:[email protected]]
Sent: Monday, September 23, 2002 5:06 AM
To: [email protected]
Subject: Re: st: how to compare weight and unweighted statistics


Yap Keng Loong  wrote
> i like to know what commands to use if i want to
> compare weight and unweighted statistics in the
> dataset.

It depends a bit on the number and nature of the statistics you want to 
compare. A general way may be to calculate weighted and unweighted
statistics 
and store the results in a postfile. Use the following as a starting point 
and take a look at -help post- for more informations.


--------------------------------------------------
postfile stats weight uweight using myfile, replace  

foreach var of varlist myvars {
     summarize `var' [weight=wvar]    /* Or whatever statistic you like */
     local weight = r(mean)
     summarize `var'
     local uweight = r(mean)
     post stats (`weight') (`uweight')
}

postclose stats

use myfile, clear
gen diff = uweight - weight
list uweight weight diff
-----------------------------------------------------

regards 
uli




-- 
[email protected]
http://www.sowi.uni-mannheim.de/lesas

*
*   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/
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index