Hello,
These are tabulations of the 2 dummy variables. A13aN3 is coded for women and A13bN3 is coded for men so presumably there should be no overlap.
tab A13aN3, missing
A13aN3 | Freq. Percent Cum.
------------+-----------------------------------
0 | 15,623 20.28 20.28
1 | 10,078 13.08 33.36
. | 51,343 66.64 100.00
------------+-----------------------------------
Total | 77,044 100.00
. tab A13bN3, missing
A13bN3 | Freq. Percent Cum.
------------+-----------------------------------
0 | 9,290 12.06 12.06
1 | 5,845 7.59 19.64
. | 61,909 80.36 100.00
------------+-----------------------------------
Total | 77,044 100.00
I'm trying to add the 2 dummy variables together to create 1 dummy variable. This is the code I used...
g A13N3 = 0 if A13aN3 == 0 | A13bN3 == 0
replace A13N3 = 1 if A13aN3 == 1 | A13bN3 == 1
I'm expecting A13N3=0 to have 24,913 obs and A13N3=1 to have 15,923. This is my output.
A13N3 | Freq. Percent Cum.
------------+-----------------------------------
0 | 13,919 18.07 18.07
1 | 11,798 15.31 33.38
. | 51,327 66.62 100.00
------------+-----------------------------------
Total | 77,044 100.00
Thanks for any assistance.
Mary
These are tabulations of the 2 dummy variables. A13aN3 is coded for women and A13bN3 is coded for men so presumably there should be no overlap.
tab A13aN3, missing
A13aN3 | Freq. Percent Cum.
------------+-----------------------------------
0 | 15,623 20.28 20.28
1 | 10,078 13.08 33.36
. | 51,343 66.64 100.00
------------+-----------------------------------
Total | 77,044 100.00
. tab A13bN3, missing
A13bN3 | Freq. Percent Cum.
------------+-----------------------------------
0 | 9,290 12.06 12.06
1 | 5,845 7.59 19.64
. | 61,909 80.36 100.00
------------+-----------------------------------
Total | 77,044 100.00
I'm trying to add the 2 dummy variables together to create 1 dummy variable. This is the code I used...
g A13N3 = 0 if A13aN3 == 0 | A13bN3 == 0
replace A13N3 = 1 if A13aN3 == 1 | A13bN3 == 1
I'm expecting A13N3=0 to have 24,913 obs and A13N3=1 to have 15,923. This is my output.
A13N3 | Freq. Percent Cum.
------------+-----------------------------------
0 | 13,919 18.07 18.07
1 | 11,798 15.31 33.38
. | 51,327 66.62 100.00
------------+-----------------------------------
Total | 77,044 100.00
Thanks for any assistance.
Mary
Comment