# ttest and outreg2

1 message
Open this post in threaded view
|

## ttest and outreg2

 This post has NOT been accepted by the mailing list yet. HI, Is it possible to use outreg2 command with test? following is what i have to repeat for 10 variables and 10 years. . ttest vw1edf1dec if year == 1999, by(allheg09) Two-sample t test with equal variances ------------------------------------------------------------------------------ Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------------- Non Hedg | 37 .183772 .0574833 .3496574 .0671904 .3003535 All Hedg | 334 .3556845 .0638102 1.166174 .2301626 .4812064 ---------+-------------------------------------------------------------------- combined | 371 .3385396 .0577783 1.112889 .2249246 .4521546 ---------+-------------------------------------------------------------------- diff | -.1719126 .1928791 -.5511927 .2073676 ------------------------------------------------------------------------------ diff = mean(Non Hedg) - mean(All Hedg) t = -0.8913 Ho: diff = 0 degrees of freedom = 369 Ha: diff < 0 Ha: diff != 0 Ha: diff > 0 Pr(T < t) = 0.1867 Pr(|T| > |t|) = 0.3734 Pr(T > t) = 0.8133 . return list scalars: r(sd) = 1.112888555684657 r(sd_2) = 1.166173558360495 r(sd_1) = .3496573923198343 r(se) = .1928791248423141 r(p_u) = .8133246313731823 r(p_l) = .1866753686268177 r(p) = .3733507372536353 r(t) = -.8912968435767951 r(df_t) = 369 r(mu_2) = .3556845056082674 r(N_2) = 334 r(mu_1) = .1837719504444583 r(N_1) = 37 . i want to use only few items e.g. r(N_1), r(N_2), r(mu_1),r(mu_2) in outreg2 it says that i can use scalars but i don't know how to use. i tried following but it gave me output of regression. outreg2 using test, adds(N, r(N_1)) dir : seeout Thanks in advance.