The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Bangladesh » Early marriage (Proportion of early marriage in report and data is not matching)
Early marriage [message #24167] Tue, 08 March 2022 00:07 Go to next message
Arif_Billah is currently offline  Arif_Billah
Messages: 11
Registered: March 2022
Member
We are using BDHS data (IR file) to measure the prevalence of early marriage with the determinants. The problem is, our prevalence for the women at age 20-24 are not matching with the report regarding the division. We used the code that used in the DHS github for the early marriage.

It would be great if there is any solution for that. If any stata coding file available for that table 4.4 in chapter 4 in the BDHS report.

Thanks in advance
Re: Early marriage [message #24219 is a reply to message #24167] Fri, 18 March 2022 10:47 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3208
Registered: February 2013
Senior Member

Following is a response from Senior DHS Specialist, Kerry MacQuarrie:

Yes, in fact we do have Stata code available for the child marriage variables you are looking for. Check out our code repository on Github: https://github.com/DHSProgram. Look under the "DHS-Indicators-Stata" repository for Stata code and then "Chap04_MS" folder for chapter 4 marriage variables. There is a Read Me file as well as do files for all the indicators/tables in that chapter.

Please try the code there and report back if you are still having trouble matching the results. If you do, please specify which survey year and datafile you are using from the BDHS.

Re: Early marriage [message #24223 is a reply to message #24219] Sat, 19 March 2022 04:48 Go to previous messageGo to next message
Arif_Billah is currently offline  Arif_Billah
Messages: 11
Registered: March 2022
Member
Than you for your response sir.

Yes, we have used that Github code but the result is not same. Please note sir, we are using BDHS 2017/18 data (IR file) to estimate the prevalence of early marriage.

use "/Users/c3272018/Documents/My Artical/Collaborative work/Arif/Early marriage/Analysis/BDIR7RFL.DTA"
** Weighting
gen rev005=v005/1000000
svyset v021, strata(v023) weight(rev005) vce(linearized) singleunit(missing)

recode v511 (.=0) (0/17 = 1 "yes") (18/49 = 0 "no"), gen (ms_afm_18)
replace ms_afm_18 = . if v012<18
label var ms_afm_18 "First marriage by age 18"
ta ms_afm_18 // this is your dependent variable

tab rev013 ms_afm_18 [iweight = rev005], row
tab rev149 ms_afm_18 [iweight = rev005], row
tab rev729 ms_afm_18 [iweight = rev005], row
tab rev130 ms_afm_18 [iweight = rev005], row
tab v190 ms_afm_18 [iweight = rev005], row
tab v714 ms_afm_18 [iweight = rev005], row
tab v025 ms_afm_18 [iweight = rev005], row
tab v024 ms_afm_18 [iweight = rev005], row

tab rev013 ms_afm_18 [iweight = rev005] if v013==2, row
tab rev149 ms_afm_18 [iweight = rev005] if v013==2, row
tab rev729 ms_afm_18 [iweight = rev005] if v013==2, row
tab rev130 ms_afm_18 [iweight = rev005] if v013==2, row
tab v190 ms_afm_18 [iweight = rev005] if v013==2, row
tab v714 ms_afm_18 [iweight = rev005] if v013==2, row
tab v025 ms_afm_18 [iweight = rev005] if v013==2, row
tab v024 ms_afm_18 [iweight = rev005] if v013==2, row


But the result is not same as shown in the BDHS report (Chapter 4, table no 4.4).


Please take a look at the codes and let us know if there is mistakes done by us.

Thank you in advance.
Re: Early marriage [message #25306 is a reply to message #24219] Thu, 29 September 2022 11:52 Go to previous messageGo to next message
Arif_Billah is currently offline  Arif_Billah
Messages: 11
Registered: March 2022
Member
Thank you @Bridgette-DHS.

Yes, we have used that Github code but the result is not same. Please note sir, we are using BDHS 2017/18 data (IR file) to estimate the prevalence of early marriage.

use "/Users/c3272018/Documents/My Artical/Collaborative work/Arif/Early marriage/Analysis/BDIR7RFL.DTA"
** Weighting
gen rev005=v005/1000000
svyset v021, strata(v023) weight(rev005) vce(linearized) singleunit(missing)

recode v511 (.=0) (0/17 = 1 "yes") (18/49 = 0 "no"), gen (ms_afm_18)
replace ms_afm_18 = . if v012<18
label var ms_afm_18 "First marriage by age 18"
ta ms_afm_18 // this is your dependent variable

tab rev013 ms_afm_18 [iweight = rev005], row
tab rev149 ms_afm_18 [iweight = rev005], row
tab rev729 ms_afm_18 [iweight = rev005], row
tab rev130 ms_afm_18 [iweight = rev005], row
tab v190 ms_afm_18 [iweight = rev005], row
tab v714 ms_afm_18 [iweight = rev005], row
tab v025 ms_afm_18 [iweight = rev005], row
tab v024 ms_afm_18 [iweight = rev005], row

tab rev013 ms_afm_18 [iweight = rev005] if v013==2, row
tab rev149 ms_afm_18 [iweight = rev005] if v013==2, row
tab rev729 ms_afm_18 [iweight = rev005] if v013==2, row
tab rev130 ms_afm_18 [iweight = rev005] if v013==2, row
tab v190 ms_afm_18 [iweight = rev005] if v013==2, row
tab v714 ms_afm_18 [iweight = rev005] if v013==2, row
tab v025 ms_afm_18 [iweight = rev005] if v013==2, row
tab v024 ms_afm_18 [iweight = rev005] if v013==2, row


But the result is not same as shown in the BDHS report (Chapter 4, table no 4.4).


Please take a look at the codes and let us know if there is mistakes done by us.

Thank you in advance.
Re: Early marriage [message #25310 is a reply to message #25306] Fri, 30 September 2022 07:23 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3208
Registered: February 2013
Senior Member
The GitHub code does not extend to EMW surveys. We already have a comment on GitHub about that limitation, and we will try to add that extension in the near future.
Re: Early marriage [message #25590 is a reply to message #25310] Mon, 14 November 2022 10:25 Go to previous messageGo to next message
Arif_Billah is currently offline  Arif_Billah
Messages: 11
Registered: March 2022
Member
Is there any way to find the solution for estimating the early marriage in Bangladesh using BDHS 2017/18 data tat matched with the BDHS report?
Re: Early marriage [message #25591 is a reply to message #25590] Mon, 14 November 2022 15:29 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3208
Registered: February 2013
Senior Member
Following is a response from Senior DHS staff member, Tom Pullum:

The Stata code listed below will match table 4.4. It can be used to construct all the chapter 4 tables with an EMW survey. For each EMW in the original IR file, the program adds an artificial never-married woman with the appropriate weight. With the "ALL.dta" file it is not necessary to use the all-women factors. HOWEVER, the construction of the alternative weights in ALL.dta does require the all-women factors and if there are covariates the correct alternative weight must be used. I hope the logic of the program is clear. Let us know if you have questions.

* Construction of table 4.4 (marriage before age 18) in the Bangladesh 2017 final report

* General strategy for EMW surveys: for each original case, add a second case
*  with residual weight and never-married status

* Specify a workspace
cd e:\DHS\DHS_data\scratch

* Read the IR file
use "...BDIR7RFL.DTA", clear 

* Must match the covariates in the table with the correct version of awfact
* Total:                 awfactt
* Residence:       v025, awfactu
* Division:        v024, awfactr
* Education:       v149, awfacte
* Wealth quintile: v190, awfactw

local letters t u r e w

* restrict to age 20-24
keep if v013==2

keep v001 v002 v003 v005 v024 v025 v149 v190 v511 awfact*
gen EMW=1
gen afm=v511

* Construct weights wt* for the original EMW cases
foreach ll of local letters {
gen wt`ll'=v005
}

save EMW.dta, replace

replace EMW=0
replace afm=99

* Construct corresponding weights wt* for the artificial NMW cases
foreach ll of local letters {
replace wt`ll'=int(((awfact`ll'-100)/100)*v005)
}

* Combine the EMW and NMW cases
quietly append using EMW.dta

* Construct the outcome, married before age 18
gen by18=0
replace by18=100 if afm<18

*save ALL.dta, replace

* Table 4.4. Marriage before age 18
* Note; the %'s and n's are produced separately.
* Ignore (!!) the totals rows for the separate panels.
  
* Total
summarize by18 [iweight=wtt/1000000]

* Residence
tab v025 [fweight=wtu], summarize(by18) means
tab v025 [iweight=wtu/1000000]

* Division
tab v024 [fweight=wtr], summarize(by18) means
tab v024 [iweight=wtr/1000000]

* Education
tab v149 [fweight=wte], summarize(by18) means
tab v149 [iweight=wte/1000000]

* Wealth quintile
tab v190 [fweight=wtw], summarize(by18) means
tab v190 [iweight=wtw/1000000]

Previous Topic: Caseid variable is not available in the height-weight data for BDHS 2004
Next Topic: Membership in NGO
Goto Forum:
  


Current Time: Wed Dec 11 16:01:57 Coordinated Universal Time 2024