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

st: RE: how to format results of ttest?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: how to format results of ttest?
Date   Mon, 4 Apr 2005 21:19:58 +0100

1. Write your own program based on -foreach-. 

2. -makematrix- from SSC. Here is a semi-stupid example: 

. sysuse auto 

. makematrix , from(r(t) r(p)) format(%6.2f %5.3f)  list  sep(10) : 
	ttest price-gear, by(foreign)  

  +------------------------------+
  |                    t       p |
  |------------------------------|
  | price           0.14   0.887 |
  | mpg            -4.17   0.000 |
  | rep78          -6.02   0.000 |
  | headroom        2.91   0.005 |
  | trunk           3.63   0.001 |
  | weight          6.93   0.000 |
  | length          6.32   0.000 |
  | turn            7.53   0.000 |
  | displacement    6.79   0.000 |
  | gear_ratio     -8.66   0.000 |
  +------------------------------+

Nick 
[email protected] 

Q. Cher Li
 
> I am conducting t-tests on dozens of variables (using 'ttest' command)
> and would like to make a single table based on the output statistics
> (mean, sd, se, obs, etc.).  I was trying to use 'estout' to format the
> table; nevertheless, I could not 'estimates store', since there are
> simply no estimates retuned after such a test (vis-�-vis those stored
> post estimation).
> Is there any other way to get around this problem?
> Any suggestions will be greatly appreciated!

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