Hi, I need to create a balance table in Stata.
My code so far is like this:
sysuse bplong.dta,clear
regress bp sex agegrp if when==2
estimates store A
regress bp sex agegrp if when==1
estimates store B
foreach var of varlist bp sex agegrp {
ttest `var', by(when)
}
estimates store C
est tab A B C
But it is supose to look this. What can I do?
My code so far is like this:
sysuse bplong.dta,clear
regress bp sex agegrp if when==2
estimates store A
regress bp sex agegrp if when==1
estimates store B
foreach var of varlist bp sex agegrp {
ttest `var', by(when)
}
estimates store C
est tab A B C
But it is supose to look this. What can I do?
Comment