The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » table replication
table replication [message #14690] Mon, 30 April 2018 08:25 Go to next message
memon_suma@yahoo.com
Messages: 15
Registered: April 2018
Member
Hi,
I am trying to make bar graphs of table 13.5 about Participation in Decision Making of Pakistan's Demographic Health Survey 2012-13. Somehow I cannot get the exact figures. I am using the following code in stata;

gen hhpurchase=0
replace hhpurchase=1 if v743b==1
label variable hhpurchase "Decision of large hh purchase"
label define hhpurchase 0 No 1 Yes
label values hhpurchase hhpurchase
graph bar hhpurchase [pw=v005]

The results are near but not exact. I am sure I am making a mistake but don't know what. Similarly, for mobility and female's own health decision results are not exact.
Please help.

[Updated on: Mon, 30 April 2018 08:25]

Report message to a moderator

Re: table replication [message #14768 is a reply to message #14690] Fri, 04 May 2018 07:42 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3013
Registered: February 2013
Senior Member
Following is a response from DHS Technical Specialist, Shireen Assaf and DHS Associate, Christina Juan:

The following code below will match Table 13.3. You were using the wrong variable for this table.

use PKIR61FL.DTA, clear

recode v739 (1=1 "mainly wife") (2=2 "jointly") (4=3 "mainly husband") (5/6=4 other) (9=5 missing), gen(decidecash_rep)

* this will match the total
ta decidecash_rep [iw=v005/1000000]

gen women_hus_earn =v746
replace women_hus_earn=9 if v746==8
replace women_hus_earn=4 if v743f==7
replace women_hus_earn=5 if v731>0 & (v741==0 | v741>2)
replace women_hus_earn=6 if v731==0

label define women_hus_earn 1"more than husband" 2"less than husband" 3"same as husband" 4"husband has no cash/work" /// 
                                                                                                         5"woman work but no cash" 6 "woman did not work"
label values women_hus_earn women_hus_earn

* this will match the crosstab for the women's earnings, ignore the category 9 which is not shown in the table
ta women_hus_earn decidecash_rep [iw=v005/1000000], row

recode v743f (1=1 "mainly wife") (2=2 "jointly") (4=3 "mainly husband") (5 6 8=4 other) (9=5 missing) (7=.), gen(decidecash_hus)
ta decidecash_hus [iw=v005/1000000]

* this will match the crosstab for the husband's earnings, ignore the category 9 which is not shown in the table
ta women_hus_earn decidecash_hus [iw=v005/1000000], row
Re: table replication [message #14822 is a reply to message #14768] Mon, 07 May 2018 12:55 Go to previous messageGo to next message
memon_suma@yahoo.com
Messages: 15
Registered: April 2018
Member
Actually, the report I am working on is Impact of women empowerment on the nutritional status of children. So my base file is that of children's. I assume I have to use that file for my entire analysis. but we do have similar variables in KR file, so why am I supposed to use IR file for this?
Re: table replication [message #14830 is a reply to message #14822] Tue, 08 May 2018 06:57 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3013
Registered: February 2013
Senior Member

Following is a response from Senior DHS Stata Specialist, Tom Pullum:

If children are your units of analysis, then yes, you should use the KR file. The relevant IR variable (v739) is also in the KR file, so do the recode in the KR file.
Previous Topic: What is the difference between hw70_1 hw70_2 hw70_3 etc?
Next Topic: Missing data
Goto Forum:
  


Current Time: Tue Mar 19 04:30:49 Coordinated Universal Time 2024