How to create and export a table in Stata?

33 views Asked by At

I have some survey data for respondents' incomes, stocks, bonds, and retirement accounts for the years 2000 to 2011. Each respondent is also divided into one of 4 groups. For each group, I want to create an annual percent change table for each of the variables. I also want to export and display this table in Word or as a PDF. How would I go about doing that?

Below is the code I have so far. While I can display the table within Stata, I'm not sure how to export it, rename the variables, or make the table look nicer. Any help is appreciated.

//dataset imported here


collapse (mean) stocks bonds income retacct, by(group year)


foreach x of varlist stocks - retacct{

bysort group (year): gen d\_\`x' = (\`x'- \`x'\[\_n-1\]) / \`x'\[\_n-1\] \* 100
}



list year d_* if group == 1, sep(0)

list year d_* if group == 2, sep(0)

list year d_* if group == 3, sep(0)

list year d_* if group == 4, sep(0)

Here is what the table output currently looks like

0

There are 0 answers