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: Thread-Index: AQHNRZdPE2i840qnJkyP2YkQRE4m+g==

From   Michael Betz <>
To   "" <>
Subject   st: Thread-Index: AQHNRZdPE2i840qnJkyP2YkQRE4m+g==
Date   Fri, 8 Jun 2012 16:54:03 +0000

Hi all--I'm trying to create at table of summary stats of a two group sample that includes group means and standard deviations and the p-value of a ttest of difference in means. I'm using -esttab- and can get the means and p-values from -espost ttest-. I'm running into a problem getting the standard deviations though. I have been trying to use -estpost summarize- and then -estadd- to add the standard deviations to the estimates I've stored from -estpost ttest-. When I look at the stored estimates after -estpost summarize- it shows e(sd) as a 1x7 matrix, but when I use -estadd- to add that matrix to the stored estimates from -estpost ttest-, e(sd) is added as a 1x1 matrix that is simply the standard deviation of the last variable in my varlist for -estpost summarize-. Below is my code.

eststo est1: estpost ttest $variables, by(treedummy)
bysort treedummy: eststo: estpost summarize $variables	//after this command if I use -ereturn list-, e(sd) is 1x7
estadd matrix sd1=e(sd): est1

sd1 is added to the stored estimates "est1", but only as a 1x1 matrix.

I appreciate any thoughts.


*   For searches and help try:

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