The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » table replication
Re: table replication [message #14768 is a reply to message #14690] Fri, 04 May 2018 07:42 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
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
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: What is the difference between hw70_1 hw70_2 hw70_3 etc?
Next Topic: Missing data
Goto Forum:
  


Current Time: Mon Dec 2 01:53:07 Coordinated Universal Time 2024