Statalist


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

st: AW: AW: Making tables with ttest


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: AW: Making tables with ttest
Date   Mon, 1 Feb 2010 17:30:37 +0100

<> 


The -drop- line in my example is of course redundant, so you can safely omit
it. 

Maarten`s solution also manages to get the # of obs into the table, so it
may well be preferable.



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Martin Weiss
Gesendet: Montag, 1. Februar 2010 17:17
An: [email protected]
Betreff: st: AW: Making tables with ttest


<> 



*************
clear*
set obs 10000
 
gen x1=rnormal()
gen x2=rnormal()

mean x?

capture which parmest
if _rc ssc install parmest

parmest, saving(myfile, replace)
u myfile, clear
drop stderr dof min95 max95

tabdisp parm, cellvar( estimate t p)
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Nuno Soares
Gesendet: Montag, 1. Februar 2010 16:55
An: [email protected]
Betreff: st: Making tables with ttest

Hi everyone,

I've been searching past posts in the list about this issue, but I haven't
found anything that solves my problem. I was wondering if there is a way of
building tables in Stata with a set of -ttest- results for different
variables. The table would look something like this (produced in SAS, and
testing for H0: mean=0):
Variable 	N 	Mean 		t Value 	Pr > |t|
A		404	-0.0130359	-2.35		0.0191
B		404	-0.0126201	-2.23		0.0260
C		404	-0.0119089	-2.15		0.0323

I've been trying to use - estpost -, but it requires the use of by() (which
I don't need).

All the best,

Nuno

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


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index