The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Malaria » Households with enough ITNs for every 2 people and or protected by IRS
Households with enough ITNs for every 2 people and or protected by IRS [message #12310] Fri, 28 April 2017 11:23 Go to previous message
Nelly_WHO is currently offline  Nelly_WHO
Messages: 6
Registered: March 2017
Member
Hi,
My results are slightly different from the results in STAT compiler. We might have a different denominator I guess, but could you let me know what is different from your code?
Thank you very much in advance,
Nelly

Households with at least one insecticide-treated mosquito net (ITN) for every two persons and/or indoor residual spraying (IRS) in the past 12 months

// number of ITNs
local ITNvar bednet_is_itn*
egen nbITN = rowtotal(`ITNvar')

// HH with at least 1 ITN
gen EnITNs=0
replace EnITNs = 1 if ((nbITN*2/hv013)>= 1)

// Determine whether the survey has the IRS variable
cap confirm variable hv253
if _rc == 0 {
summ hv253
if `r(N)' != 0 {
gen IRS12=0
replace IRS12=1 if hv253==1 & (hv253a==1|hv253b==1|hv253c==1|hv253d==1|hv253e==1|hv253f==1 |hv253g==1|hv253h==1)
}
summ hv253
if `r(N)' == 0 {
gen IRS12=.
}
}
cap confirm variable hv253
if _rc != 0 {
gen IRS12=.
}

// HH with at least 1ITN and/or IRS
gen EnITNsorIRS12=0
replace EnITNsorIRS12=1 if (EnITNs == 1 | IRS12 == 1)

// loop through to calculate survey-weighted means & SEs
svyset [pweight=sample_weight], psu(cluster_num)
local m EnITNsorIRS12

// TOTAL
svy: mean `m' if hv013>=1
ereturn list
matrix mean_matrix = e(b)
matrix variance_matrix = e(V)
local mean = mean_matrix[1,1]
local se = sqrt(variance_matrix[1,1])
gen prop_`m' = `mean'
gen seprop_`m' = `se'
gen uci_`m' = prop_`m' + 1.96*seprop_`m'
gen lci_`m' = prop_`m' - 1.96*seprop_`m'
drop seprop*
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: roportion of existing nets that have been used the previous night
Next Topic: Antimalarial - Afghanistan 2015
Goto Forum:
  


Current Time: Mon Dec 23 15:17:45 Coordinated Universal Time 2024