The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Kenya » Table 2.19 Health insurance coverage
Re: Table 2.19 Health insurance coverage [message #28020 is a reply to message #27994] Thu, 02 November 2023 10:34 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 Senior DHS staff member, Tom Pullum:

The Stata lines pasted below will construct table 2.19 in the final report on the Kenya 2022 survey. This is a country-specific version of health insurance. Note that the data are in the PR file and were only collected in a subsample. You have to restrict to de jure cases.

use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\KEPR8BFL.DTA", clear

lookfor insurance

tab1 sh27 sh28*,m

forvalues lc=1/6 {
gen col_`lc'=0 if sh27<. & hv102==1
}

* Construct separate variables for the columns of the table
replace col_1=100 if col_1==0 & sh28a==1
replace col_2=100 if col_2==0 & sh28b==1
replace col_3=100 if col_3==0 & sh28c==1
replace col_4=100 if col_4==0 & sh28x==1
replace col_5=100 if col_5==0 & sh27==0 | sh27==8
replace col_6=100 if col_6==0 & sh27==1

label variable col_1 "NHIF"
label variable col_2 "Priv/commercial"
label variable col_3 "Community based"
label variable col_4 "Other"
label variable col_5 "DK"
label variable col_6 "Any"

gen     age3=1
replace age3=2 if hv105>=15
replace age3=3 if hv10v>=65
label define age3 1 "0-14" 2 "15-64" 3 "65+"
label values age3 age3

* Get the table with tabstat.  Note the use of fweight
tabstat col_1-col_6 [fweight=hv005], statistics(mean) format(%6.2f) by(hv025)
tabstat col_1-col_6 [fweight=hv005], statistics(mean) format(%6.2f) by(hv270)

* Can get the frequencies as follows
tab age3  if col_1<. [iweight=hv005/1000000]
tab hv025 if col_1<. [iweight=hv005/1000000]
tab hv270 if col_1<. [iweight=hv005/1000000]

 
Read Message
Read Message
Read Message
Previous Topic: Health Insurance
Next Topic: Figure 4.4 Trends in early marriage
Goto Forum:
  


Current Time: Thu Nov 28 09:33:55 Coordinated Universal Time 2024