The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Fertility » high-risk fertility behaviour
Defining categories of high risk fertility [message #9790 is a reply to message #9766] Wed, 18 May 2016 20:45 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3063
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:


Here is a Stata program to define the high-risk categories. This will match the numbers in the first column of table 8.5 in the main report on the Nigeria 2013 DHS survey. It works with only the KR file.

* Stata program to identify the high risk birth categories in table 8.5 of the
* Nigeria 2013 DHS survey

set more off
use e:\DHS\DHS_data\KR_files\NGKR6AFL.dta, clear

* Check the total number of weighted cases
tab b5 [iweight=v005/1000000]

gen age_of_mother=int((b3-v011)/12)

* Adjustment for multiple births to give the same order as that of the first in multiples;
* b0 is sequence in the multiple birth IF part of a multiple birth; b0=0 if not a multiple birth;
* only shift the second (or later) birth within a multiple birth.

gen bord_adj=bord
*replace bord_adj=bord-1 if b0==2
*replace bord_adj=bord-2 if b0==3

replace bord_adj=bord-b0+1 if b0>1


* Single risk categories, initial definition

* Four basic criteria
gen young=0
gen old=0
gen soon=0
gen many=0

replace young=1 if age_of_mother<18
replace old=1 if age_of_mother>34
replace soon=1 if b11<24
replace many=1 if bord_adj>3

gen unavoidable_risk=0
replace unavoidable_risk=1 if bord_adj==1 & young==0 & old==0

* Construct the four single-risk categories
gen too_young=0
gen too_old=0
gen too_soon=0
gen too_many=0

replace too_young=1 if young==1 & old==0 & soon==0 & many==0
replace too_old =1 if young==0 & old==1 & soon==0 & many==0
replace too_soon =1 if young==0 & old==0 & soon==1 & many==0
replace too_many =1 if young==0 & old==0 & soon==0 & many==1

* Pooling of single risk categories
gen single_risk=0
replace single_risk=1 if too_young+too_old+too_soon+too_many>0

* Construct the five multiple-risk categories
gen too_young_too_soon=0
gen too_old_too_soon=0
gen too_old_too_many=0
gen too_old_too_soon_too_many=0
gen too_soon_too_many=0

replace too_young_too_soon =1 if young==1 & old==0 & soon==1 & many==0
replace too_old_too_soon =1 if young==0 & old==1 & soon==1 & many==0
replace too_old_too_many =1 if young==0 & old==1 & soon==0 & many==1
replace too_old_too_soon_too_many=1 if young==0 & old==1 & soon==1 & many==1
replace too_soon_too_many =1 if young==0 & old==0 & soon==1 & many==1

* Pooling of multiple risk categories
gen multiple_risk=0
replace multiple_risk=1 if too_young_too_soon+too_old_too_soon+too_old_too_many+too_old _too_soon_too_many+too_soon_too_many >0

* Pooling of any avoidable risk
gen any_avoidable_risk=0
replace any_avoidable_risk=1 if single_risk+multiple_risk>0

* Give results
format %6.3f too* single* multiple* any* un*
mean un too* single* multiple* any [iweight=v005/1000000]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Ideal fertility sons and daughters v613 v627 v628
Next Topic: Colombia 2010- Revising unmet need for contraception
Goto Forum:
  


Current Time: Tue May 21 17:27:01 Coordinated Universal Time 2024