The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Kenya » KDHS 2014 - Table 7.12 Need and demand for family planning among currently married women
KDHS 2014 - Table 7.12 Need and demand for family planning among currently married women [message #28632] Sat, 10 February 2024 08:29
sokiya is currently offline  sokiya
Messages: 79
Registered: May 2017
Location: Nairobi
Senior Member
Hi,
I am trying to reproduce the results found in Table 7.12 Need and demand for family planning among currently married women of KDHS 2014 report using the following syntax but the totals aren't the same
use "KEIR71FL.dta", clear
gen wt=v005/1000000

//Unmet need spacing
gen fp_unmet_space = v626a==1
label var fp_unmet_space "Unmet need for spacing"

//Unmet need limiting
gen fp_unmet_limit = v626a==2
label var fp_unmet_limit "Unmet need for limiting"

//Unmet need total
gen fp_unmet_tot = (v626a==1|v626a==2)
label var fp_unmet_tot "Unmet need total"

//Met need spacing
gen fp_met_space = v626a==3
label var fp_met_space "Met need for spacing"

//Met need limiting
gen fp_met_limit = v626a==4
label var fp_unmet_limit "Met need for limiting"

//Met need total
gen fp_met_tot = (v626a==3|v626a==4)
label var fp_met_tot "Met need total"

//Total demand for spacing
gen fp_demand_space = (v626a==1|v626a==3)
label var fp_demand_space "Total demand for spacing"

//Total demand for limiting
gen fp_demand_limit = (v626a==2|v626a==4)
label var fp_demand_limit "Total demand for limiting"

//Total demand -total
gen fp_demand_tot = inlist(v626a,1,3,2,4)
label var fp_demand_tot "Total demand - total"

foreach v of varlist fp_unmet_space fp_unmet_limit fp_unmet_tot fp_met_space fp_met_limit fp_met_tot fp_demand_space fp_demand_limit fp_demand_tot {
	replace `v' = 100 if `v' == 1
}

tabstat fp_unmet_space fp_unmet_limit fp_unmet_tot fp_met_space fp_met_limit fp_met_tot fp_demand_space fp_demand_limit fp_demand_tot [fweight=v005] if v501 == 1 | v501 == 2, statistics(mean) format(%6.1f)
Any help will be appreciated. Thanks in advance!
 
Read Message
Previous Topic: Table 5.5 Birth intervals
Next Topic: Table 6.5 Fertility planning status
Goto Forum:
  


Current Time: Fri Nov 29 17:11:41 Coordinated Universal Time 2024