Code:
local time "30 90 365" foreach time in `time'{ * import - unconditional use "`time'_uncond_clean", clear tabstat *_`time', by(armcd) stat(mean sd median) long col(stat) format(%9.2f) estpost ttest readm_`time' snf_`time' ed_`time' hspc_`time' ambul_`time' other_`time' total_`time', by (armcd) esttab, wide nonumber mtitle("diff.") append esttab using "$output/table/ttest_v1.xls", replace import delimited "$output/table/ttest_v1.xls", clear list, clean noobs foreach var of varlist *_`time' { replace `var' = substr(`var',3,length(`var')-3) } list, clean noobs }
0 Response to export to several sheets using esttab
Post a Comment