For example, instead of:
Code:
. sysuse nlsw88, clear
(NLSW, 1988 extract)
. tab1 married collgrad union
-> tabulation of married
married | Freq. Percent Cum.
------------+-----------------------------------
single | 804 35.80 35.80
married | 1,442 64.20 100.00
------------+-----------------------------------
Total | 2,246 100.00
-> tabulation of collgrad
college graduate | Freq. Percent Cum.
-----------------+-----------------------------------
not college grad | 1,714 76.31 76.31
college grad | 532 23.69 100.00
-----------------+-----------------------------------
Total | 2,246 100.00
-> tabulation of union
union |
worker | Freq. Percent Cum.
------------+-----------------------------------
nonunion | 1,417 75.45 75.45
union | 461 24.55 100.00
------------+-----------------------------------
Total | 1,878 100.00Code:
Variable | Freq. Percent
-------------+------------------------
married | 1,442 64.20
college grad | 532 23.69
union | 461 24.55
-------------+------------------------
or
Variable | Freq. Percent
-----------------+------------------------
married | 1,442 64.20
college graduate | 532 23.69
union worker | 461 24.55
-----------------+------------------------With best wishes and thaks,
Jane
0 Response to n and % for a series of binary variables
Post a Comment