Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: tabstat, weights and correct standard errors of means


From   Svend Juul <SJ@SOCI.AU.DK>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: tabstat, weights and correct standard errors of means
Date   Mon, 12 May 2008 10:11:59 +0200

Rob wrote:
 
I'm using tabstat with fweights to generate sample
means of some variables.  Is there a simple method to
get the correct standard errors for the means using
tabstat? The default standard errors of the means are
not sensitive to the use of weights and tabstat does
not function with svy. I cannot use tabout in this
case.
 
====================================================================
 
What do you mean by "default standard errors are not sensitive 
to the use of weights"? In the following example [fweight] 
does influence SE:
 
     . sysuse auto
     . tabstat price , by(foreign) stat(mean semean)
 
     Summary for variables: price
          by categories of: foreign (Car type)
 
      foreign |      mean  se(mean)
     ---------+--------------------
     Domestic |  6072.423  429.4911
      Foreign |  6384.682  558.9942
     ---------+--------------------
        Total |  6165.257  342.8719
     ------------------------------
 
     . tabstat price [fweight=rep78] , by(foreign) stat(mean semean)
 
     Summary for variables: price
          by categories of: foreign (Car type)
 
      foreign |      mean  se(mean)
     ---------+--------------------
     Domestic |  6162.517  256.1235
      Foreign |  6133.778  236.4856
     ---------+--------------------
        Total |  6151.511  181.8117
     ------------------------------
 
Svend
 
________________________________________________________ 
 
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6 
DK-8000 Aarhus C,  Denmark 
Phone, work:   +45 8942 6090 
Phone, home:   +45 8693 7796 
Fax:           +45 8613 1580 
E-mail:        sj@soci.au.dk 
_________________________________________________________ 


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