The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Constructing # of Sibling and HHmember rank Variables
Constructing # of Sibling and HHmember rank Variables [message #9639] Wed, 27 April 2016 21:04 Go to next message
abukhatwa is currently offline  abukhatwa
Messages: 2
Registered: November 2015
Location: Worcester, MA
Member
I am tying to measure the impact of the Ivory Coast civil war on educational attainments using DID, for my control variables I ma trying to construct a variable for the number of siblings in the household and a variable for the household member order(oldest, youngest...)

*V218 in the birth recode indicates the total number of living children in the household, is there any way to generate number of siblings variable using v218?

* How to generate a household member rank variable?

Thank you for your help!
Abir




A
Re: Constructing # of Sibling and HHmember rank Variables [message #9654 is a reply to message #9639] Fri, 29 April 2016 10:43 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3190
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:

The following Stata lines should do this, in the limited sense noted in comments at the end. You will have to change the paths.


use e:\DHS\DHS_data\BR_files\CIBR61FL.dta, clear
keep if b16>0 & b16<98
sort v001 v002 v003 b16
save e:\DHS\DHS_data\scratch\temp1.dta, replace

gen sibs_in_hh=1

collapse (sum) sibs_in_hh, by(v001 v002 v003)
replace sibs_in_hh=sibs_in_hh-1
tab sibs_in_hh,m

sort v001 v002 v003
merge v001 v002 v003 b16 using e:\DHS\DHS_data\scratch\temp1.dta

tab _merge
tab sibs_in_hh,m
drop _merge

* This file will include the number of siblings (children with the same mother) who are living in the same
* household, WITH THE MOTHER. Siblings who are not living with the mother will be much harder to identify.

Re: Constructing # of Sibling and HHmember rank Variables [message #9681 is a reply to message #9654] Thu, 05 May 2016 19:39 Go to previous messageGo to next message
abukhatwa is currently offline  abukhatwa
Messages: 2
Registered: November 2015
Location: Worcester, MA
Member
Thank you Bridgette! This is very helpful!

I am trying to generate number of siblings for household members using household member recode,I understood that the commands you sent me are to generate number of siblings for a child under 5, since b16 indicates the child's line number. Am I correct?

The way I thought of this is: follow the same steps with few adjustments, I generated a son/daughter variable=1 if hv101==3 (head's son/ daughter) and =0 otherwise.

generate sonORdaughter=0
replace sonORdaughter=1 if hv101==3


then I followed the steps you sent me

use PooledDataHHMem99-12
sort hv001 hv002 sonORdaughter
save PooledDataHHMem99-12, replace
gen sibs_in_hh=1
collapse (sum) sibs_in_hh, by ( hv001 hv002 sonORdaughter)
replace sibs_in_hh=sibs_in_hh-3
*sibs_in_hh-3 (hv101 head=1 wife/husband=2)
replace sibs_in_hh=0 if sibs_in_hh<0
tab sibs_in_hh, m
merge hv001 hv002 sonORdaughter using PooledDataHHMem99-12
tab _merge
tab sibs_in_hh, m
drop _merge

Does this look right?

I also wanted to generate an oldest child and youngest child variable. To generate the oldest child I ran:

gen son_daug_order=0
replace son_daug_order=hvidx-2 if sonORdaughter==1
gen oldest=1
replace oldest=2 if son_daug_order==1

Is this right? If yes, how can I generate youngest child variable?

Your help is greatly appreciated!

Thank you,

Abir


A

[Updated on: Sun, 08 May 2016 12:50]

Report message to a moderator

Re: Constructing # of Sibling and HHmember rank Variables [message #9993 is a reply to message #9681] Tue, 14 June 2016 11:18 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3190
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:

The procedure I described is not limited to children under 5. It uses the BR file, not the KR file. The KR file is limited to children under 5 but the BR file includes all children in the birth histories.

I don't understand why you shifted to the PR file and hv101. Was there some reason for doing that?

The PR file only gives age in completed years for children over age 5. In the BR file you have the month and year of birth for all children, and after more probing than in the PR file. Age is more detailed and more accurate in the BR file than in the PR file.

Note that the line numbers of the mother and father, respectively, if they are in the same household as the child, are given as hv112 and hv114, respectively. This is provided for most surveys since 2000 for children age 0-17.

Please say again what it is you are looking for. I believe that you want the number of older siblings and the number of younger siblings for children in the PR file. Should these be living siblings only? In the same household? For what age range?
Previous Topic: Pooled Multinomial Logistic Regression
Next Topic: analyzing blood pressure and blood glucose
Goto Forum:
  


Current Time: Sat Nov 9 04:47:59 Coordinated Universal Time 2024