The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » Child discipline-South Africa Demographic health Survey 2016 (S934a and S934b (child discipline))
Re: Child discipline-South Africa Demographic health Survey 2016 [message #22311 is a reply to message #22302] Thu, 25 February 2021 09:36 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3214
Registered: February 2013
Senior Member
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

The following lines will lead to table 19.11.1, after opening the IR file:

gen     hita=.
gen     hitb=.
gen     hitab=.
replace hita=0  if s934a<. 
replace hitb=0  if s934b<.
replace hitab=0 if hita==0 | hitb==0

replace hita=1  if s934a==1
replace hitb=1  if s934b==1
replace hitab=1 if hita==1 | hitb==1

tab v013 hita [iweight=v005/1000000], row


This would be repeated for hitb and hitab and other covariates. There are more elegant procedures for constructing the table but this is the basic coding. Similarly for men, to get table 19.11.2, using the MR file and sm620a/b.

I also get 4612 weighted cases rather than 4613. Don't worry about that discrepancy. The coding is correct.

The forum posting includes examples of merging the IR and MR files with the PR file. Such merges will put the child discipline variables onto the mother's or father's lines in the PR file. It will not link them to specific children.
 
Read Message
Read Message
Read Message
Previous Topic: Immunization Coverage
Next Topic: calculating height for age for children in Ghana
Goto Forum:
  


Current Time: Sat Dec 21 11:21:37 Coordinated Universal Time 2024