Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: AW: One-sample ttests with estpost

From   "Martin Weiss" <>
To   <>
Subject   st: AW: One-sample ttests with estpost
Date   Thu, 10 Jun 2010 15:05:54 +0200


You may want to exploit the equivalence btw -ttest- and -reg-, though:

sysuse auto, clear
ttest mpg==0
reg mpg


-----Ursprüngliche Nachricht-----
Von: [] Im Auftrag von Florian Szuecs
Gesendet: Donnerstag, 10. Juni 2010 11:47
Betreff: st: One-sample ttests with estpost

Dear Statalisters,

I'm trying to automatically generate a large table containing means, s.d.,
observations and one-sample ttests (of the form ttest x=0) for multiple
variables across different subsamples. My approach was to use estpost
ttest for each subsample and then join the results using esttab. This
would allow me to display the ttest-results as significance stars next to
the means.

Estpost, however, only supports two-mean ttests and simply setting all obs
out of the current subsample to zero for the ttest meddles with the
degrees of freedom. In a similar matter, statalisters suggested using
either a matrix or the parmest command to obtain the desired results, but
I failed to adapt this to my problem.

Any ideas on how to get estpost to do what I want it to do?

Thanks in advance,


*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index