Hi all,
Many thanks in advance for any help you can offer. I'm currently using estpost , eststo, and esttab from SSC in Stata 15.1 and am running into issues combining multiple stored summary statistics into one column in a table with esttab.
For confidentiality reasons I can't include my data but I'll use the auto dataset from Stata to demonstrate the issue.
What I'd like to generate is a table with two columns: foreign==0 and foreign==1 that displays the mean value of mpg at each foreign level but also the proportions of rep78 values for each foreign level.
I've tried the following code:
Which (understandably) generates a table with 4 columns, two being the mean values of mpg as generated with su and two being the proportions of rep78 as generated from tab.
Is there a way to shift over the results from tab so that they're in the same columns as those from summarize? Essentially, to override what I think is the default to group the columns by the e() that they're storing?
Thank you so much for any help you can offer and apologies if I'm missing any relevant information to make my question easier to understand!
Many thanks in advance for any help you can offer. I'm currently using estpost , eststo, and esttab from SSC in Stata 15.1 and am running into issues combining multiple stored summary statistics into one column in a table with esttab.
For confidentiality reasons I can't include my data but I'll use the auto dataset from Stata to demonstrate the issue.
What I'd like to generate is a table with two columns: foreign==0 and foreign==1 that displays the mean value of mpg at each foreign level but also the proportions of rep78 values for each foreign level.
I've tried the following code:
Code:
sysuse auto estpost su mpg if foreign==0 eststo m1 estpost su mpg if foreign==1 eststo m2 estpost tab rep78 if foreign==0 eststo m3 estpost tab rep78 if foreign==1 eststo m4 esttab m1 m2 m3 m4, cells(mean pct) nonumber nomtitle
Is there a way to shift over the results from tab so that they're in the same columns as those from summarize? Essentially, to override what I think is the default to group the columns by the e() that they're storing?
Thank you so much for any help you can offer and apologies if I'm missing any relevant information to make my question easier to understand!

Comment