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

Re: st: How to get standard errors from tabulate


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   Re: st: How to get standard errors from tabulate
Date   Tue, 4 Oct 2005 13:32:34 +0200

Kristin J. Kleinjans wrote:
> this is a question from a beginner - I am making tables with crosstabs
> using 'tabulate', but would like to get the standard errors instead of the
> standard deviations. I am using Stata 8SE.

I suspect that you use -tabulate- with the -summarize- option, but there is no 
solution within that framework for your problem.

However, -tabstat- allows the calculation of standard-errors of means for 
groups defined by one dimension:

. sysuse auto
. tabulate for, sum(trunk)
. tabstat trunk, by(for) s(mean sd semean)

If you want more dimensions the situation will be different. I usually  apply 
something in the line of

. collapse (mean) mtrunk=trunk (sd) sdtrunk=trunk (count) ntrunk=trunk, by(for 
rep78)
. gen setrunk = sdtrunk/sqrt(ntrunk)
. list for rep mtrunk setrunk


many regards
uli

-- 
[email protected]
+49 (030) 25491-361
*
*   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