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

Re: st: Descriptive statistics and normality tests


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: Descriptive statistics and normality tests
Date   Tue, 21 Sep 2004 10:32:26 -0400

Herve,

If you really need that in a table, then your best option might be to
do quick and dirty -post-ing:

tempfile topost
postfile str20 varname double (mean sd skewness kurtosis pskew pkurt
p) using `topost'
foreach x of varlist <here come your variables> {
   sum `x', detail
   local mean = r(mean)
   local sd = r(sd)
   local skew = r(skewness)
   local kurt  = r(kurtosis)
   sktest `x'
   local pskew = r(P_skew)
   local pkurt = r(P_kurt)
   local p = r(P_chi2)
   post `topost' (`x') (`mean') (`sd') (`skew') (`kurrt') (`pskew')
(`pkurt') (`p')
}
postclose `topost'
preserve
use `topost'
li , sep(0)
restore

I have not tried it, use at your own risk :)). You can also make it a
nice ado-file, etc.


On Tue, 21 Sep 2004 16:19:32 +0200, Herve STOLOWY <[email protected]> wrote:
> Dear All:
> 
> Is there an easy way to display in the same table a few summary statistics with a normality test for each variable? I know how to do separately (with tabstat and sktest) but have some difficulties to get it automatically in the same table.
> 
> Best regards
> 
> Herv� Stolowy
> HEC Paris
> 
> ***********************************************************
> HEC Paris
> D�partement Comptabilit�-Contr�le de gestion / Dept of Accounting and Management Control
> 1, rue de la Liberation
> 78351 - Jouy-en-Josas
> France
> Tel: +33 1 39 67 94 42
> Fax: +33 1 39 67 70 86
> [email protected]
> http://campus.hec.fr/profs/stolowy/perso/home.htm
> 
> *
> *   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/
> 



-- 
Stas Kolenikov
http://stas.kolenikov.name

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