Hello,
This is a question that has come up after my last couple posts on the Statalist and is now a question I have more generally because I feel that it may be beneficial in the future as well in addition to my current dilemna.
The general question is; is there a possibility, when using -tabm-, to force Stata to generate percentages in the output table?
For the sake of an example, I have this code to generate results of question responses where it could be a "1" or "2" response:
And it produces this table:
Is there a way, using -tabm-, to get that table to have the percentage of "1" responses out of the total? So for q10a, the new percentage column would say 65.16%...I do not see any guidance on percentages in the -help tabm- file. And is there a general consensus way to do this with -tabm- generally? Thank you.
This is a question that has come up after my last couple posts on the Statalist and is now a question I have more generally because I feel that it may be beneficial in the future as well in addition to my current dilemna.
The general question is; is there a possibility, when using -tabm-, to force Stata to generate percentages in the output table?
For the sake of an example, I have this code to generate results of question responses where it could be a "1" or "2" response:
Code:
preserve keep q10a q10b q10c q10d q10e q10f findname, all(inlist(@, 1, 2, .)) tabm `r(varlist)' restore
variable | 1 | 2 | Total |
q10a | 101 | 54 | 155 |
q10b | 111 | 20 | 131 |
q10c | 90 | 30 | 120 |
q10d | 150 | 6 | 156 |
q10e | 125 | 26 | 151 |
q10f | 105 | 15 | 120 |
Comment