Hello everyone,
I am a beginner in Stata and encountered a problem while using putexcel.
I ran: bys year pct_nonwhite_5: sum i_fin_total_expend_per_ada [w=ada3].
In my data, pct_nonwhite_5 is a quintile variable ranging from 1 to 5, and year ranges from 2000 to 2019.
As a result, I see many tables/results by year and by pct_nonwhite_5 (year=2019 pct_nonwhite_5=1; year=2019 pct_nonwhite_5=2; year=2019 pct_nonwhite_5=3, etc.)
-> year = 2019, pct_nonwhite_5 = 1
Variable | Obs Weight Mean Std. Dev. Min Max
-------------+-----------------------------------------------------------------
i_fin_tota~a | 104 30073.4038 13113.5 3236.992 6507.106 36659.49
--------------------------------------------------------------------------------------
-> year = 2019, pct_nonwhite_5 = 2
Variable | Obs Weight Mean Std. Dev. Min Max
-------------+-----------------------------------------------------------------
i_fin_tota~a | 103 57752.7042 12671.59 2477.241 9403.23 24458.79
--------------------------------------------------------------------------------------
-> year = 2019, pct_nonwhite_5 = 3
Variable | Obs Weight Mean Std. Dev. Min Max
-------------+-----------------------------------------------------------------
i_fin_tota~a | 103 75173.4285 13141.43 2578.462 9883.942 28688.66
--------------------------------------------------------------------------------------
-> year = 2019, pct_nonwhite_5 = 4
Variable | Obs Weight Mean Std. Dev. Min Max
-------------+-----------------------------------------------------------------
i_fin_tota~a | 103 156746.606 13387.34 2396.398 10333.27 32401.17
--------------------------------------------------------------------------------------
-> year = 2019, pct_nonwhite_5 = 5
Variable | Obs Weight Mean Std. Dev. Min Max
-------------+-----------------------------------------------------------------
i_fin_tota~a | 103 494569.695 15122.61 3812.337 6877.485 32993.67
I want to save all the results to one excel sheet with A1: year, B1: pct_nonwhite_5, and C1: i_fin_total_expend_per_ada.
How would I code this so that I get the excel file I want?
Best,
Aaron
Related Posts with Putexcel, Save Multiple Tables into One Excel
"sts graph, risktable() saving()" tries (and fails) to save graph-file twiceHi all, I've come across some unexpected behaviour which I'd appreciate comments on. I'm using Stat…
Droping outliers based on different criteriaDear all, I use Stata 13 and I want to calculate average value of X removing outliers (1st and 99th…
MIXLOGITWTP space - Individual wtpHello, in choice data I am estimating wtp space using the command mixlogitwtp which works well. How…
Add lable to binary variableHello. I have a binary variable "size" : 1 means it's small, 0 means it's large. But in my data bas…
How to do a differential effect in StataI have a binary variable : 0 = English company, 1 = French company. I have a second variable "profit…
Subscribe to:
Post Comments (Atom)
0 Response to Putexcel, Save Multiple Tables into One Excel
Post a Comment