The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Residing in same household in KR file (Create vaiable for residing in same household)
Residing in same household in KR file [message #28758] Mon, 04 March 2024 21:14 Go to next message
kmdshoyaib is currently offline  kmdshoyaib
Messages: 13
Registered: May 2022
Member
I am working on a analysis related to vaccine dropouts and vaccine delays using KR file for most recent survey in India. I have considered multiple factors at the household level to assess the risk factors for delay in vaccination (such as Distance for Health facility: Big problem, Type of Residency etc).

In this regard I would like to generate a binomial variable "Residing in same household: Yes or No" for all the entries in KR file to account for the clustering effect on the other variables during the regression analysis. I am NOT looking to generate any variable for siblings.

I am using STATA MP 18 for analysis.

One way I see how it can be done is ... for all observations, if cluster number is same, then within that cluster if household number is same then for that observation, Residing in same household can be marked as Yes or else No. But for this statement i am unable to write a command in STATA.

Kindly help me with a STATA command or provide a stata command to accomplish the task using some other methodology.

Any help is really appreciated.

Thanks in advance

[Updated on: Mon, 04 March 2024 21:14]

Report message to a moderator

Re: Residing in same household in KR file [message #28761 is a reply to message #28758] Tue, 05 March 2024 09:54 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:

In the KR file for the NFHS's, children in the same household will have the same values of v024 v001 v002. Children with the same mother (in the household) will have the same values of v024 v001 v002 v003. You cannot do what you want to do by just adding a binary variable for "same household" or "same mother" because you want to describe a relationship between cases.

One way to approach this would be with a multi-level model. You can find some literature on household clustering or maternal clustering. Frankly, however, I don't think that will be very helpful.

I suggest another approach, which is to construct a data file of PAIRS of children in the KR file who have the same mother. You might expect a huge number of such pairs but I calculate that there would only be 62,170 pairs in the KR file for the NFHS5, compared with 232,920 children in that file.

I suggest that you use the following Stata program to construct a file that pairs the child with bidx=1 with the child with bidx=2, for women who have 2+ children. There are 50,253 such pairs. If you bring in other pairs, such as pairs of bidx=1 and bidx=3, you will be repeating the children with bidx=1. With this file you can look at similarities and differences between the two children. You will, however, have some difficulties. For example, there will not be many pairs in which both children are age 12-23 months. Note that some of these pairs are twins. Hope this will help.

* Construct a file of pairs of the two most recent births in the same household

cd e:\DHS\DHS_data\scratch

use "...IAKR7EFL.DTA", clear 
tab bidx
rename v024 state
rename v001 cluster
rename v002 HH
rename v003 MO_line

save temp0.dta, replace
keep if bidx==1
rename b* b*_1
rename m* m*_1
rename h* h*_1
rename HH hh
rename MO_line mo_line
save temp1.dta, replace

use temp0.dta, clear
keep if bidx==2
keep state cluster HH MO_line b* m* h*
rename b* b*_2
rename m* m*_2
rename h* h*_2
rename HH hh
rename MO_line mo_line
merge 1:1 state cluster hh mo_line using temp1.dta
tab _merge
keep if _merge==3
drop _merge

* File with the data for the two most recent births, if 2+
save temp12.dta, replace
tab bidx*

Previous Topic: Survey weighting with HIV and Domestic violence weights
Next Topic: SSU variables in the Mauritania DHS2019-2021
Goto Forum:
  


Current Time: Thu Nov 28 13:25:07 Coordinated Universal Time 2024