The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Fertility » Ideal fertility sons and daughters v613 v627 v628
Re: Ideal fertility sons and daughters v613 v627 v628 [message #14747 is a reply to message #14714] Thu, 03 May 2018 13:40 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3230
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:

I recommend that you do these calculations separately for different years, rather than pooling across the range 2003-11.

These variables can have codes 96 or 98, and cases with those codes must be excluded from the calculations.

Think of the data structure as just a set of rows representing respondents and columns representing responses to questions, or variables, just like an Excel spreadsheet. In a given row, v613 will be the sum of v627 and v628 and v629 (ignoring non-numeric responses). That is, if v617=1 and v628=1 and v629=1, then v613 will be 1+1+1=3. Of course, there are many other combinations of v627, v628, and v629 for which the sum will be 3. For example, 0+0+3=3.

Below are Stata lines showing that v613 is indeed the sum of v627, v628, and v629 in the file for 2010 (PEIR61FL.dta).

set more off
set maxvar 10000
numlabel, add

use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\PEIR61FL.DTA", clear

tab v007

describe v613 v627 v628 v629

gen v613r=v613
replace v613r=. if v613>=96

gen v627r=v627
replace v627r=. if v627>=96

gen v628r=v628
replace v628r=. if v628>=96

gen v629r=v629
replace v629r=. if v629>=96

regress v613r v627r v628r v629r


index.php?t=getfile&id=871&private=0
  • Attachment: table.GIF
    (Size: 18.41KB, Downloaded 919 times)

[Updated on: Thu, 03 May 2018 13:43]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: computation of sibling composition
Next Topic: high-risk fertility behaviour
Goto Forum:
  


Current Time: Sat May 31 17:55:17 Coordinated Universal Time 2025