Dear Stata users,
can someone please help me with following problem?
In my Project we have a survey with mulitple survey waves. Every wave we need to transfer a lot of frenquency-tables to a nicely layoutet word-Dokument. Therefore I need to export the tables to Excel in a first step, than I can use Bookmarks to transfer everything in my Word Layout.
My aim are tables looking something like this:
For some questions missings should be included, for others not.
The export to excel actually worked quite fine using "putexcel" and "tab2xl".
The only problem: for the transfer to Word it is important that the same values always appear in the same excel-cells and also observations woth n=0 must be reportet.
Using tab2xl does not show results with n=0. Therefore the locations of all values in the table vary.
I already found out, that I can export the frequencies including n=0 with:
tabcount var_1, v(1/3) zero matrix(var_1_m)
putexcel B150 = matrix(var_1_m), names hcenter
But now, the percentages are missing.
I‘ve never worked with matrices before.
Is it possible, to add a new colmn with the percentages to my matrix? And maybe also the value-labels for orientation?
I am happy about every Idea!
Thank you in advance,
Janin
can someone please help me with following problem?
In my Project we have a survey with mulitple survey waves. Every wave we need to transfer a lot of frenquency-tables to a nicely layoutet word-Dokument. Therefore I need to export the tables to Excel in a first step, than I can use Bookmarks to transfer everything in my Word Layout.
My aim are tables looking something like this:
var_1 | Freq. | Percent |
1 | 115 | 72,33 |
2 | 44 | 27,67 |
Total | 159 | 100,00 |
The export to excel actually worked quite fine using "putexcel" and "tab2xl".
The only problem: for the transfer to Word it is important that the same values always appear in the same excel-cells and also observations woth n=0 must be reportet.
Using tab2xl does not show results with n=0. Therefore the locations of all values in the table vary.
I already found out, that I can export the frequencies including n=0 with:
tabcount var_1, v(1/3) zero matrix(var_1_m)
putexcel B150 = matrix(var_1_m), names hcenter
But now, the percentages are missing.
I‘ve never worked with matrices before.
Is it possible, to add a new colmn with the percentages to my matrix? And maybe also the value-labels for orientation?
I am happy about every Idea!
Thank you in advance,
Janin
Comment