Hi all,

Newbie to Stata here, just migrated from R. I am struggling with understanding the methods of exporting variables into tables in Stata. I am basically looking at the equivalent of R's knittr package in Stata. I have nearly 20 svy outputs from a single .do file that I need to store in an excel (means and se only). I am confused about how to store the results in objects (R speak) and then tabulate in a table in Stata. Below is the code producing results (shortened):

frame change 1
svyset [pw=is]
svy: mean var1

frame change 2
svyset [pw=ip]
svy: mean var2
.
.
.
.
frame change 20
svyset pw=io]
svy: mean var20

I need a table that looks like below:
Variable Mean Se
var1 2 0.2
var2 3 0.2
var3 6 0.2
. 2 0.2
. 1.5 0.2
. 1.9 0.2
var20 3.22 0.2
I looked up estpost on http://repec.org/bocode/e/estout/hlp...l#svy_tabulate. However, it is only meant for one dataset. Can someone help explain how to store the various svy: mean var* results as variables and then print out a nice excel out of the .do file?