On Mon, Jan 26, 2009 at 12:02 PM, Nick Cox <[email protected]> wrote:
> If you wanted to embed similar code in a do file or program to be used
> frequently, you could for efficiency rewrite using -summarize,
> meanonly-.
>
> Nick
> [email protected]
I think this is exactly what -tabstat- is doing, in particular it is
already aware of which statistics can be obtained with which commands
fastest:
class 1 : available via -summarize, meanonly-
class 2 : available via -summarize-
class 3 : available via -detail-
It then loops over variables and computes those statistics. Not very
efficient, but it works.
I wrote a plugin with a limited set of statistics (means, totals,
freqs, weighted proportions) but much better performance and it
outputs results in matrices, ready for XML_TAB to output them to
Excel.
TabStatMat by Austin Nichols will combine r()-saved results to
matrices after tabstat.
Best,
Sergiy Radyakin
>
> Kit Baum
>
> Martin complains that -total- (like -mean-, presumably) performs
> listwise deletion (unlike, say, -summarize-). To get around this:
>
> --------------
> clear all
> sysuse auto
> local mw price mpg rep78
> foreach v of local mw {
> qui total `v'
> mat b = nullmat(b),e(b)
> mat en = nullmat(en), e(_N)
> }
> mat list b
> mat list en
> --------------
>
> *
> * 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/
>
*
* 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/