Dear Stata users,
I'm using -putexcel- to export the results of a regression model into an Excel spreadsheet:
svy, subpop(sample): reg pulse_oz i.agecat##i.wave kcal
margins i.agecat##i.wave, subpop (sample)
matrix M=r(table)'
putexcel B2=matrix (M)
However, I'm having some trouble with exporting the levels of i.agecat##i.wave into column A. Since i.agecat has 2 levels and i.wave has 2 levels, column A should look like this:
11
12
21
22
...but I can't seem to figure out how to do that. I've reviewed the documentation for stored results as well as this forum but I haven't been able to identify a solution. I'd be grateful for any suggestions. Thank you.
I'm using -putexcel- to export the results of a regression model into an Excel spreadsheet:
svy, subpop(sample): reg pulse_oz i.agecat##i.wave kcal
margins i.agecat##i.wave, subpop (sample)
matrix M=r(table)'
putexcel B2=matrix (M)
However, I'm having some trouble with exporting the levels of i.agecat##i.wave into column A. Since i.agecat has 2 levels and i.wave has 2 levels, column A should look like this:
11
12
21
22
...but I can't seem to figure out how to do that. I've reviewed the documentation for stored results as well as this forum but I haven't been able to identify a solution. I'd be grateful for any suggestions. Thank you.
Comment