I am trying to export a frequency table generated by tab2 or tabout.
Alternatively
Is there anyway I could use estout eststo and esttab to produce the table? I assume the code would look like this, but it doesn't work when I run it.
I am hoping to export this into a table that looks like :
Code:
local var a b c d e f tab2 `var' treat
Code:
tabout `var' treat using myfile.csv
Code:
foreach x in `var'{
estpost tab `x' treat
eststo tab`x'
estout tab`x' using output.doc, c(b) unstack collabels(N) append
}
Variable Treat Non-Treat a freq freq b freq freq c freq freq
