PDHS 2017-18 Table 4.3: Age at first Marriage Table [message #27238] |
Wed, 05 July 2023 07:30 |
|
Hi!
I have been using following STATA code for computing "First marriage by exact ages"
____________________________________________________________ ________________________________
FILE: IR women file
____________________________________________________________ ________________________________
gen wt=v005/1000000
//Married by specific ages
recode v511 (.=0) (0/14 = 1 "yes") (15/49 = 0 "no"), gen (fma15)
label var fma15 "First marriage by age 15"
recode v511 (.=0) (0/17 = 1 "yes") (18/49 = 0 "no"), gen (fma18)
replace fma18 = . if v012<18
label var fma18 "First marriage by age 18"
recode v511 (.=0) (0/19 = 1 "yes") (20/49 = 0 "no"), gen (fma20)
replace fma20 = . if v012<20
label var fma20 "First marriage by age 20"
recode v511 (.=0) (0/21 = 1 "yes") (22/49 = 0 "no"), gen (fma22)
replace fma22 = . if v012<22
label var fma22 "First marriage by age 22"
recode v511 (.=0) (0/24 = 1 "yes") (25/49 = 0 "no"), gen (fma25)
replace fma25 = . if v012<25
label var fma25 "First marriage by age 25"
////////Table 4.3 column//////////////
tab v013 fma15 [iw=wt], row nofreq
tab fma15 if v013>=2 [iw=wt]
tab fma15 if v013>=3 [iw=wt]
tab v013 fma18 if v013>=2 [iw=wt], row nofreq
tab fma18 if v013>=2 [iw=wt]
tab fma18 if v013>=3 [iw=wt]
tab v013 fma20 if v013>=2 [iw=wt], row nofreq
tab fma20 if v013>=2 [iw=wt]
tab fma20 if v013>=3 [iw=wt]
tab v013 fma22 if v013>=3 [iw=wt], row nofreq
tab fma22 if v013>=3 [iw=wt]
tab v013 fma25 if v013>=3 [iw=wt], row nofreq
tab fma25 if v013>=3 [iw=wt]
____________________________________________________________ _________________
It is not producing the exact figures as reported in final report of PDHS 2017-18 Table 4.3 page75.
Kindly guide for correction of error if any in above code.
Regards
Waqas Imran
Waqas Imran
[Updated on: Thu, 06 July 2023 01:25] Report message to a moderator
|
|
|