The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » Child discipline (Identify in the IR file the mothers of child who was randomly selected in PR to answer child discipline questions)
Child discipline [message #25269] Mon, 26 September 2022 09:53 Go to next message
lprafa is currently offline  lprafa
Messages: 4
Registered: October 2020
Member
Hi, I have a question regarding the child discipline module and the merging of the child discipline module with the IR file. I need all women's information from the IR file, but I also would like to identify whom among the women in the IR file are the mothers of the children who were randomly selected in the PR file to answer the child discipline questions. I managed to merge easily the women in the IR file with the same women in the PR file, though this is not enough to know if those women are also the children's mothers. I am aware that caregivers answered the child discipline module, hence sometimes fathers or other household members answered (and some of these caregivers are not women 15-49 appearing in the IR file), yet my sample in this case needs to be defined by the women in the IR file (cause I need many other controls included in the IR file), hence I want to identify whom among those women are mothers of the children who were randomly selected. Any suggestion on how to identify these and do the merge most efficiently? Thank you very much for your kind help.

[Updated on: Mon, 26 September 2022 09:53]

Report message to a moderator

Re: Child discipline [message #25291 is a reply to message #25269] Wed, 28 September 2022 14:49 Go to previous messageGo to next message
Janet-DHS is currently offline  Janet-DHS
Messages: 658
Registered: April 2022
Senior Member
Following is a response from DHS staff member Tom Pullum:

Which country and survey are you using? Users are asked to provide that information with every question
Re: Child discipline [message #25296 is a reply to message #25291] Thu, 29 September 2022 01:14 Go to previous messageGo to next message
lprafa is currently offline  lprafa
Messages: 4
Registered: October 2020
Member
I am very sorry for this omission. I am actually using all DHS waves that have a child discipline module. One example with Burundi 2016-17 would be perfectly fine, hence BUIR70FL, BUPR71FL, and BUHR71FL. If I understand the logic for one country, I'll then extend it to all remaining ones. Thanks so much for your help.
Re: Child discipline [message #25321 is a reply to message #25296] Mon, 03 October 2022 14:40 Go to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 658
Registered: April 2022
Senior Member
Following is a response from DHS staff member Tom Pullum:

The Stata code pasted below should do what you want. The crucial variable is hv112. For children age 0-17 in the PR file, hv112 is the line number of the mother, if she is in the same household. The variable names for the child discipline module are different in different surveys. I use an old version of the merge command, which I prefer.


* specify a workspace
cd e:\DHS\scratch

* Find children selected for the child discipline module
use "...BUPR71FL.DTA" , clear

* to find the variable names
lookfor spank
describe sh174*
*tab1 sh174*

* to find the variable that gives the line number of the selected child
lookfor selected

* to find the structure of the data
*list hv001 hv002 hvidx hv101-hv105 sh159 sh174a if hv001==1, table clean

* save the selected children
keep if hvidx==sh159

gen cluster=hv001
gen hh=hv002
gen ch_line=hvidx
gen mo_line=hv112
gen fa_line=hv114
gen care_line=sh13b

sort cluster hh mo_line
save BU_selected_children.dta, replace

* Find the mothers
use "...BUIR71FL.DTA" , clear
gen cluster=v001
gen hh=v002
gen mo_line=v003
sort cluster hh mo_line
merge cluster hh mo_line using BU_selected_children.dta

* Now have a file of child/woman pairs
gen type=_merge

label define type 1 "Woman unmatched with child" 2 "Child unmatched with mother" 3 "Child/mother pair"
label values type type

tab type
Previous Topic: child mortality ,mother autonomy and husband/partner related variables
Next Topic: Difference between data and report
Goto Forum:
  


Current Time: Thu Mar 28 11:05:22 Coordinated Universal Time 2024