Bookmark and Share

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


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

st: t-test query


From   "Mirnezami, Oliver" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: t-test query
Date   Fri, 19 Apr 2013 13:34:07 +0000

Hello

I am trying run a series of difference in means tests using the code below. How can you add some sort of label to show which variable the test refers to? Stata just does one test after another after another but doesn't label. I guess I can go through the order of the variables but would be nice if it was clearly labelled. I've had a look through the help guide but can't find a way to do this. I've included just a few variables here but I wish to run this for many and so it's difficult to identify which variables are in which test otherwise. 

local varlist health married hispanic college 
local yeareffects  y1994 y1996 y1998 y2000
local controls married hispanic college

xtreg health `controls `yeareffects' , fe vce(cluster id)
gen sample4 = e(sample)
forval i = 4/4 {
foreach j in `varlist' { 
ttest `j' if (sample4 ==1), by(treatment) unequal 
}
}

Thank you

Oliver 



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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