I have been stuck on a tabulation which has proven to be rather complex for me and so far I have had no success. I decided to post here hoping that the issue can finally be resolved with gracious help.
I have a dataset of a survey that I have been performing analysis on. I am trying to create one dummy variable called 'premarital' which will take the value of '1' if the man has had his first intercourse prior to his first union/marriage and the value will be '0' if the first intercourse occurred either after or at the same time as the first union/marriage. This will be done by comparing the ages at which the two activities (age at first marriage/union and age at first intercourse) took place. If the man's age at first intercourse is the same as his age at first marriage/union or if his age at first intercourse is later than the age at first marriage/union, then it will contribute to '0'.
A never-married individual may engage in intercourse, so it will contribute to the value of '1' in the dummy variable 'premarital'. However, if the never-married individual hasn't engaged in intercourse, then it'll contribute to '0'.
For the 'premarital' variable, both never-married and ever-married individuals (currently and formerly married) will be taken into account. However, I also seek another variable 'premarital_m' which will only take into account the currently and formerly married individuals and whether their first intercourse occurred before, after or at the same time as first union/marriage.
There are individuals who haven't experienced intercourse yet so they have to be taken out of the equation. Another problem is how to include 'First time when started living with wife' from 'ms10' into the equation so the people who gave this response instead of an age will also contribute to '0'. The 'missing' values also have to be taken out so the calculation can be accurate.
With everything done, I could then tabulate the rate of such pre-union activity with the variables 'premarital' and 'premarital_m' by the respondent's residence, level of education...etc which are provided in the dataset by simply 'tab hh6a premarital' as an example, where hh6a gives the proportion of urban and rural residence for the sample respondents.
I hope this is possible and a solution which would give an accurate rate is obtainable. Some respondents provided only the age at first marriage/union and then didn't provide the age at first intercourse/union, only giving the response that it happened at the first time they entered an union and this might complicate things I feel. Hopefully a good solution is still possible.
Here is what I have:
I have a dataset of a survey that I have been performing analysis on. I am trying to create one dummy variable called 'premarital' which will take the value of '1' if the man has had his first intercourse prior to his first union/marriage and the value will be '0' if the first intercourse occurred either after or at the same time as the first union/marriage. This will be done by comparing the ages at which the two activities (age at first marriage/union and age at first intercourse) took place. If the man's age at first intercourse is the same as his age at first marriage/union or if his age at first intercourse is later than the age at first marriage/union, then it will contribute to '0'.
A never-married individual may engage in intercourse, so it will contribute to the value of '1' in the dummy variable 'premarital'. However, if the never-married individual hasn't engaged in intercourse, then it'll contribute to '0'.
For the 'premarital' variable, both never-married and ever-married individuals (currently and formerly married) will be taken into account. However, I also seek another variable 'premarital_m' which will only take into account the currently and formerly married individuals and whether their first intercourse occurred before, after or at the same time as first union/marriage.
There are individuals who haven't experienced intercourse yet so they have to be taken out of the equation. Another problem is how to include 'First time when started living with wife' from 'ms10' into the equation so the people who gave this response instead of an age will also contribute to '0'. The 'missing' values also have to be taken out so the calculation can be accurate.
With everything done, I could then tabulate the rate of such pre-union activity with the variables 'premarital' and 'premarital_m' by the respondent's residence, level of education...etc which are provided in the dataset by simply 'tab hh6a premarital' as an example, where hh6a gives the proportion of urban and rural residence for the sample respondents.
I hope this is possible and a solution which would give an accurate rate is obtainable. Some respondents provided only the age at first marriage/union and then didn't provide the age at first intercourse/union, only giving the response that it happened at the first time they entered an union and this might complicate things I feel. Hopefully a good solution is still possible.
Here is what I have:
Code:
. tab magem
Age at |
first |
marriage/un |
ion - man | Freq. Percent Cum.
------------+-----------------------------------
1 | 1 0.01 0.01
3 | 2 0.03 0.04
6 | 3 0.04 0.09
8 | 2 0.03 0.12
9 | 5 0.07 0.19
10 | 19 0.28 0.47
11 | 13 0.19 0.65
12 | 40 0.58 1.24
13 | 69 1.00 2.24
14 | 132 1.92 4.16
15 | 203 2.95 7.11
16 | 329 4.78 11.89
17 | 533 7.75 19.64
18 | 604 8.78 28.42
19 | 641 9.32 37.74
20 | 669 9.73 47.47
21 | 574 8.35 55.82
22 | 629 9.15 64.96
23 | 478 6.95 71.91
24 | 442 6.43 78.34
25 | 363 5.28 83.61
26 | 278 4.04 87.66
27 | 203 2.95 90.61
28 | 184 2.68 93.28
29 | 132 1.92 95.20
30 | 94 1.37 96.57
31 | 52 0.76 97.32
32 | 57 0.83 98.15
33 | 42 0.61 98.76
34 | 24 0.35 99.11
35 | 15 0.22 99.33
36 | 11 0.16 99.49
37 | 9 0.13 99.62
38 | 11 0.16 99.78
39 | 7 0.10 99.88
40 | 2 0.03 99.91
41 | 3 0.04 99.96
42 | 2 0.03 99.99
46 | 1 0.01 100.00
------------+-----------------------------------
Total | 6,878 100.00
. tab ms10
Age at first sexual intercourse | Freq. Percent Cum.
----------------------------------------+-----------------------------------
Never had sexual intercourse | 2,085 20.95 20.95
10 | 5 0.05 21.00
11 | 4 0.04 21.04
12 | 23 0.23 21.27
13 | 56 0.56 21.84
14 | 144 1.45 23.28
15 | 725 7.29 30.57
16 | 852 8.56 39.13
17 | 823 8.27 47.40
18 | 1,135 11.41 58.81
19 | 558 5.61 64.42
20 | 730 7.34 71.75
21 | 249 2.50 74.25
22 | 262 2.63 76.89
23 | 175 1.76 78.65
24 | 111 1.12 79.76
25 | 219 2.20 81.96
26 | 58 0.58 82.54
27 | 56 0.56 83.11
28 | 38 0.38 83.49
29 | 21 0.21 83.70
30 | 21 0.21 83.91
31 | 2 0.02 83.93
32 | 7 0.07 84.00
33 | 3 0.03 84.03
34 | 4 0.04 84.07
35 | 5 0.05 84.12
36 | 1 0.01 84.13
37 | 1 0.01 84.14
38 | 1 0.01 84.15
39 | 1 0.01 84.16
40 | 1 0.01 84.17
First time when started living with wif | 1,567 15.75 99.92
Missing | 8 0.08 100.00
----------------------------------------+-----------------------------------
Total | 9,951 100.00
. tab mstatu
Marital/Union status - man | Freq. Percent Cum.
---------------------------+-----------------------------------
Currently married/in union | 6,721 67.54 67.54
Formerly married/in union | 157 1.58 69.12
Never married/in union | 3,073 30.88 100.00
---------------------------+-----------------------------------
Total | 9,951 100.00

Comment