Dear Stata Users,
As a new user, I would like some help with exporting results directly into excel after running the loop below.
local y "agegroup gender duration"
foreach var of local y {
forvalues i = 1/3 {
proportion fma if finaldd == `i', over(`var') percent
matrix `var'_`i' = r(table)
}
}
The results of the above loop are stored in 9 different matrix tables. An example of one matrix table stored is given below - 1 represents male and 2- female.
I was going to ask if there was a way to extract only the information in bold and then export into excel. Using putexcel means writing too many lines of commands and I want to believe there is a more straight forward way of doing this.
Looking forward to your replies. Thanks.
As a new user, I would like some help with exporting results directly into excel after running the loop below.
local y "agegroup gender duration"
foreach var of local y {
forvalues i = 1/3 {
proportion fma if finaldd == `i', over(`var') percent
matrix `var'_`i' = r(table)
}
}
The results of the above loop are stored in 9 different matrix tables. An example of one matrix table stored is given below - 1 represents male and 2- female.
gender_1[9,4] | |||
0.fma@ | 0.fma@ | 1.fma@ | 1.fma@ |
1.gender | 2.gender | 1.gender | 2.gender |
b 99.172502 | 94.707091 | .82749841 | 5.2929085 |
se .1142776 | .5075362 | .1142776 | .5075362 |
t 867.82097 | 186.60165 | 7.2411249 | 10.428632 |
pvalue 0 | 0 | 4.851e-13 | 2.638e-25 |
ll 98.915599 | 93.619234 | .63106954 | 4.381839 |
ul 99.36893 | 95.618161 | 1.0844012 | 6.3807662 |
df 8229 | 8229 | 8229 | 8229 |
crit 1.9602523 | 1.9602523 | 1.9602523 | 1.9602523 |
eform 0 | 0 | 0 | 0 |
I was going to ask if there was a way to extract only the information in bold and then export into excel. Using putexcel means writing too many lines of commands and I want to believe there is a more straight forward way of doing this.
Looking forward to your replies. Thanks.
Comment