Please, I would like export test results from stata to latex. Here's what I want to do.
test of the difference between the variables 'price' and 'turn'
which yields
Please, how can I export the last row ('diff') to latex? I am aware of estpost ttest, but it requires specifying a group variable which does not apply to my case. I am also aware of asdoc, but it's for exporting to word. I have resorted to manually coping and pasting results from stata into a table in latex but that's tedious especially when many variables are involved and one needs to run some regression several times and results change.
Code:
sysuse auto
Code:
ttest price=turn
Code:
Paired t test ------------------------------------------------------------------------------ Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------------- price | 74 6165.257 342.8719 2949.496 5481.914 6848.6 turn | 74 39.64865 .5114145 4.399354 38.6294 40.6679 ---------+-------------------------------------------------------------------- diff | 74 6125.608 342.7139 2948.137 5442.58 6808.636 ------------------------------------------------------------------------------ mean(diff) = mean(price - turn) t = 17.8738 Ho: mean(diff) = 0 degrees of freedom = 73 Ha: mean(diff) < 0 Ha: mean(diff) != 0 Ha: mean(diff) > 0 Pr(T < t) = 1.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 0.0000
Comment