Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: AW: estpost tabstat


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: AW: estpost tabstat
Date   Mon, 6 Apr 2009 15:18:46 +0100

-estpost- is a user-written program (part of Ben Jann's -estout-
package). Use -findit- to identify locations. 

Ben has already signalled his intention to fix -estpost-. 

I focus here particularly on Martin's opening statement. I don't agree. 

Even programmers when using their own programs don't all have perfect
retention of all the syntax details. Even if you wrote -tabstat- (I
didn't), it is likely that you would get it wrong sooner or later over
whether something was coded -statistics()- or -stats()-, as you don't
re-read your own help file every time you use a program. Rather than be
bit by a minor and arbitrary distinction, you tend to fix the program to
allow either, and may be capricious about whether that's documented. 

The issue for (frequent) users is similar. It's often better therefore
to accommodate reasonable small variations than have people writing in
saying "Why can't the syntax be such-and-such?" 

A related issue is British versus American English. It's much easier to
accommodate variant spellings silently than to raise a small issue for
the issue to work out which way it was coded. 

Nick 
n.j.cox@durham.ac.uk 

Martin Weiss

I think "stats" should not be an abbreviation for "statistics" in
official
-tabstat-. At least the documentation for the -columns()- option could
make
the issue clearer. -tabstat.ado- checks for the "columns" local btw
lines 41
and 57, and allows "stats" in line 50 as a specification of "statistics"
in
an "else if" once it is past the usual -substr()- check for
abbreviations of
"variables" or "statistics".
The help file for -tabstat- only mentions that "(stats() is a synonym
for
statistics().)" under "statistics", but not under "columns"...

How -estpost- handles the issue is harder to find out. It gets passed
thru
to a quiet call to official -tabstat- but I am having a hard time trying
to
see what it does next to format its own output- which probably need not
match the one delivered by -tabstat-

Richard Ochmann

I stumbled over this issue:

***
sysuse auto
***

While

***
estpost tabstat price mpg, col(stat)
***

returns as expected:

Summary statistics: mean
     for variables: price mpg

             |   e(mean) 
-------------+-----------
       price |  6165.257 
         mpg |   21.2973 

***
estpost tabstat price mpg, col(stats)
***

returns:

Summary statistics: mean
     for variables: price mpg

             |  e(price)     e(mpg) 
-------------+----------------------
        mean |  6165.257    21.2973 


Given that both

***
tabstat  price mpg, col(stat)
tabstat  price mpg, col(stats)
***

do the desired:

    variable |      mean
-------------+----------
       price |  6165.257
         mpg |   21.2973
------------------------

I am surprised finding the above.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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