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/