|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: tabstat, weights and correct standard errors of means
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: [email protected]
_________________________________________________________
*
* 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/