Code:
table (ballpoint) (progexp) , statistic(freq) statistic(percent, across(ballpoint)) totals(progexp) nformat(%5.1f) sformat("(%s%%)" freq percent)
collect recode result count = frequency
collect label levels ballpoint progexp "N", modify
collect layout (ballpoint) (progexp#result)
--------------------------------------------------------
| progexp
| 0 1
| Frequency Percent Frequency Percent
----------+---------------------------------------------
ballpoint |
0 | 61.0 (75.3%) 13.0 (68.4%)
1 | 20.0 (24.7%) 6.0 (31.6%)
Total | 81.0 (100.0%) 19.0 (100.0%)Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte(ballpoint progexp) 1 0 1 0 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 1 0 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 1 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 end
0 Response to Joining frequency and percentage in same column
Post a Comment