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

Re: st: Nice tables


From   Ginger A Smith <[email protected]>
To   [email protected]
Subject   Re: st: Nice tables
Date   Mon, 26 Jul 2004 11:22:07 -0400

Hello Eric,

I'd be interested in hearing from other listers of how they make nice tables too.
Here's the way I do it:
This example makes a table comparing the means of two groups (treatment and control). The code below creates column1.out with means and column2.out with standard errors. The rows are the variables var1 var2 and var3. I can open these files using Excel and easily create the tables (especially if you use good variable labels). However, its not as nice as -outreg- for regressions. I'd love to add some code to do a t-test of means (control vs. treatment), add significance stars and append the columns together.

Good luck,
Ginger

-------

use data, clear
sort control
collapse (mean) var1 var2 var3, by(control)
xpose, clear format(%9.3f) varname
outsheet using column1

use data, clear
sort control
collapse (sd) var1 var2 var2, by(control)
xpose, clear format(%9.3f) varname
outsheet using column2

/* note control is a 0/1 variable, var1-var3 are continuous */

-------

--On Saturday, July 24, 2004 10:59 AM -0400 Eric Jensen <[email protected]> wrote:


I'm a big fan of outreg for exporting regression results to Word.  I've
recently been asked to do a job that had previously been done in SPSS,
which I won't use (example of why: Stata flagged a perfect predictor the
first time I reran a probit in Stata, that SPSS had somehow allowed into
the specification!).  SPSS does make nice looking tables, though.  Is
there an equivalent ado file to outreg for crosstabs?  Or (much to my
potential chagrin) is there something new(er) within Stata documented in
those v8 manuals I've been too cheap to buy?


Thanks,   Eric Jensen

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


************************
Ginger Smith
Economics
Health Management and Policy
University of Michigan

Room M3041, SPH II
109 S. Observatory St.
Ann Arbor, MI 48108-2029

[email protected]
phone: 734-615-2558

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