The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Fertility » Calculating Period Parity Progression Ratio
Re: Calculating Period Parity Progression Ratio [message #7080 is a reply to message #7079] Thu, 20 August 2015 11:48 Go to previous messageGo to previous message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Here is Dr. Pullum's response:
Quote:
To get that specific table in Stata, you could use the following lines. Note that in that survey, year of birth is coded with only two digits. For example, "1995" is coded "95". More recent surveys generally use four digits for the year.

The main complication is that the births in the birth histories are sequenced in reverse temporal order. That is, birth 1 is the most recent birth. You need to work from bord, with gives the birth order of each birth. One way to do that, with local notation, is shown here. There are other ways.

Another complication is that the indexes for the births in the birth history are 01, 02,....09, 10, 11, etc. I recommend that the leading 0 for 01 through 09 be removed with a rename command, as shown.

Let me know if you have other questions.

* Construction of table 16.29 in Chapter 16 of Methods and Materials of Demography

* open PHIR3BFL.dta

set more off

* get the names of the b variables
describe b*01

describe bord*
* there are up to 20 births in the birth histories

* remove the unnecessary 0's in the index for the b variables
rename b*_0* b*_*

* The births in the birth history are numbered in reverse order;
*   it will be convenient to resequence them by birth order
* This approach can be used for other years and parities

gen year_1=.
gen year_2=.

local li=1
while `li'<=20 {
replace year_1=b2_`li' if bord_`li'==1
replace year_2=b2_`li' if bord_`li'==2
local li=`li'+1
}

tab year_1 year_2 if year_1>=90 & year_2>=90

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: mother's age at last birth
Next Topic: computation of sibling composition
Goto Forum:
  


Current Time: Fri Nov 22 19:34:29 Coordinated Universal Time 2024