Following is a response from DHS Lead Malaria Research Analyst, Cameron Taylor:
You can find the malaria chapter SPSS code on our website https://github.com/DHSProgram/DHS-Indicators-SPSS/tree/maste r/Chap12_ML
To calculate the "Percentage of children under age 5 who slept the night before the survey under an ITN" you need to use the PR file (NGPR7AFL). Your denominator/unit of analysis for this indicator is CHILDREN or PEOPLE. When you use the HR file your unit of analysis is households. The following video might be of help: https://www.youtube.com/watch?v=JGRJZCGiCJw
The following code matches 2018 Nigeria DHS final report Table 12.7. I have also included code to match Table 12.11 "Percentage of children under age 5 with a fever in the 2 weeks preceding the survey" using NGKR71FL.
CODE TO RECREATE TABLE 12.7
*Categorizing nets.
if hml12=0 ml_netcat=0 .
if hml12=1|hml12=2 ml_netcat=1.
if hml12=3 ml_netcat=2.
variable labels ml_netcat "Mosquito net categorization".
*Slept under an ITN last night.
compute ml_slept_itn=(ml_netcat=1).
variable labels ml_slept_itn "Slept under an ITN last night".
value labels ml_slept_itn 0 "No" 1 "Yes".
compute wt=hv005/1000000.
weight by wt.
****************************************************.
compute filter = (hv103=1 & hml16<5).
filter by filter.
crosstabs
/tables = hv104 hv025 hv024 hv270 by ml_slept_itn
/format = avalue tables
/cells = row
/count asis.
CODE TO RECREATE TABLE 12.11
do if b5<>0.
+compute ml_fever=(h22=1).
end if.
variable labels ml_fever "Fever symptoms in the 2 weeks before the survey".
value labels ml_fever 0 "No" 1 "Yes".
compute wt=v005/1000000.
weight by wt.
* create denominators.
compute num=1.
variable labels num "Number".
execute.
compute age=b19.
recode age (0 thru 11=1) (12 thru 23=2) (24 thru 35=3) (36 thru 47=4) (48 thru 60=5) into agecat.
variable labels agecat "Age".
value labels agecat 1 "<12" 2 "12-23" 3 "24-35" 4 "36-47" 5 "48-59".
****************************************************.
crosstabs
/tables = agecat b4 v025 v024 v106 v190 by ml_fever
/format = avalue tables
/cells = row
/count asis.