Malaria Analysis with SAS Code
Malaria Analysis with SAS Code
sas
Execution Environment
Author: u64151009
File: /home/u64151009/sasuser.v94/ZWhite/PROJ/[Link]
SAS Platform: Linux LIN X64 5.14.0-284.30.1.el9_2.x86_64
SAS Host: [Link]
SAS Version: 9.04.01M7P08062020
SAS Locale: en_US
Submission Time: 5/15/2025, 12:13:25 PM
Browser Host: [Link]
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/[Link] Safari/537.36
Application Server: [Link]
Code: [Link]
/* BEDNET OWNERSHIP */
if 'MAIN_MALARIA_CONTROL_HAS_NETS'n = 1 then BedNet = 1;
else if 'MAIN_MALARIA_CONTROL_HAS_NETS'n = 2 then BedNet = 0;
else BedNet = .;
/* GENDER */
Gender = DEMOGRAFIC_GENDER;
/* LITERACY */
ReadAble = '[Link]'n;
WriteAble = '[Link]'n;
if ReadAble = 1 and WriteAble = 1 then Literate = 1;
else if ReadAble = 2 or WriteAble = 2 then Literate = 0;
else Literate = 0;
/* HOUSING VARIABLES */
MetalRoof = '[Link]'n;
DurableWall = ('[Link] bricks'n = 1 or '[Link] block'n = 1);
about:blank 1/23
5/15/25, 12:13 PM Program Summary - [Link]
keep MalariaPos IRSsprayed BedNet AgeGroup Gender Literate MetalRoof DurableWall;
run;
data save.clean_mopeia;
set mopeia;
/* 4a. Distributions */
proc freq data=mopeia;
tables MalariaPos IRSsprayed BedNet AgeGroup Gender Literate MetalRoof DurableWall / missing;
title "Overall Distribution of Analysis Variables";
run;
/* IRSsprayed × BedNet */
proc logistic data=mopeia descending;
class IRSsprayed (ref='0')
BedNet (ref='0')
AgeGroup (ref='1')
Gender (ref='1')
Literate (ref='0')
about:blank 2/23
5/15/25, 12:13 PM Program Summary - [Link]
MetalRoof (ref='0')
DurableWall (ref='0')
/ param=ref;
model MalariaPos = IRSsprayed|BedNet AgeGroup Gender Literate MetalRoof DurableWall
/ clodds=wald lackfit;
title "Interaction: IRSsprayed × BedNet";
run;
Log: [Link]
Notes (46)
NOTE: Unable to open parameter catalog: [Link] in update mode. Temporary parameter values will be saved to
[Link].
Name MAIN_CLINIC_DATA_SAMPLES_TEST_RESULT truncated to MAIN_CLINIC_DATA_SAMPLES_TEST_RE.
Name MAIN_MALARIA_CONTROL_MEASURES_LAST WEEK truncated to MAIN_MALARIA_CONTROL_MEASURES_LA.
Name PCD Reference File.2016 Spray Status truncated to PCD Reference File.2016 Spray St.
Name PCD Reference File.2017 Spray Status truncated to PCD Reference File.2017 Spray St.
Name PCD Reference [Link] Health Facility truncated to PCD Reference [Link] Healt.
Name PCD Reference [Link] To Closest Health Facility truncated to PCD Reference [Link] To Closest.
Problems were detected with provided names. See LOG.
79 /**********************************************************************
80 * PRODUCT: SAS
81 * VERSION: 9.4
82 * CREATOR: External File Interface
83 * DATE: 15MAY25
84 * DESC: Generated SAS Datastep Code
85 * TEMPLATE SOURCE: (None Specified.)
86 ***********************************************************************/
87 data WORK.MOPEIA_RAW ;
88 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
89 infile '/home/u64151009/sasuser.v94/BioStat/Files/ngenirs-mopeia-cross-sectional-survey_2018.csv' delimiter = ','
89 ! MISSOVER DSD lrecl=32767 firstobs=2 ;
90 informat DEMOGRAFIC_GENDER best32. ;
91 informat "[Link]"N best32. ;
92 informat MAIN_HAD_MALARIA best32. ;
93 informat "[Link]"N best32. ;
94 informat MAIN_WRITE best32. ;
95 informat "[Link]"N best32. ;
96 informat "[Link]"N best32. ;
97 informat "[Link] plastic"N best32. ;
98 informat "[Link] covered with sand"N best32. ;
99 informat "[Link] bark"N best32. ;
100 informat "[Link] and zinc"N best32. ;
101 informat "[Link] bricks"N best32. ;
102 informat "[Link]"N best32. ;
103 informat "[Link] block"N best32. ;
104 informat "[Link]"N best32. ;
105 informat MAIN_ADMIN_TIME best32. ;
106 informat MAIN_ROOF best32. ;
107 informat "[Link]"N best32. ;
108 informat "[Link]"N best32. ;
109 informat "[Link]"N best32. ;
110 informat "[Link]"N best32. ;
111 informat "[Link]"N best32. ;
112 informat "[Link]"N best32. ;
113 informat "[Link]"N best32. ;
114 informat MAIN_OCUPATION best32. ;
about:blank 3/23
5/15/25, 12:13 PM Program Summary - [Link]
115 informat "[Link]"N best32. ;
116 informat "[Link]"N best32. ;
117 informat "[Link]"N best32. ;
118 informat "[Link]"N best32. ;
119 informat "[Link]"N best32. ;
120 informat "[Link]"N best32. ;
121 informat "[Link]"N best32. ;
122 informat "[Link]"N best32. ;
123 informat PERM_ID $16. ;
124 informat CLUSTER_ID best32. ;
125 informat "[Link]"N best32. ;
126 informat MAIN_HF_TRAV_TIME best32. ;
127 informat MAIN_EDUCATION best32. ;
128 informat "[Link]"N best32. ;
129 informat "Ed.EP1"N best32. ;
130 informat "Ed.EP2"N best32. ;
131 informat "Ed.ESG1"N best32. ;
132 informat "Ed.ESG2"N best32. ;
133 informat "[Link]"N best32. ;
134 informat "[Link] basico"N best32. ;
135 informat "[Link] Medio"N best32. ;
136 informat "[Link]"N best32. ;
137 informat "[Link]"N best32. ;
138 informat "[Link]"N best32. ;
139 informat FAMILY_ID $12. ;
140 informat DEMOGRAFIC_DATE_VISIT anydtdtm40. ;
141 informat AGE_GROUP best32. ;
142 informat "Age.u5"N best32. ;
143 informat "Age.o5"N best32. ;
144 informat VILLAGE_ID best32. ;
145 informat "[Link]"N best32. ;
146 informat MAIN_MALARIA_CONTROL_HAS_NETS best32. ;
147 informat MAIN_MALARIA_CONTROL_NET_COUNT best32. ;
148 informat "[Link].48"N best32. ;
149 informat "[Link]"N best32. ;
150 informat "[Link]"N best32. ;
151 informat MAIN_CLINIC_DATA_SAMPLES_TEST_RE best32. ;
152 informat MAIN_MALARIA_CONTROL_NETS best32. ;
153 informat MAIN_MALARIA_CONTROL_MEASURES_LA best32. ;
154 informat "[Link]"N best32. ;
155 informat "[Link]"N best32. ;
156 informat "[Link]"N best32. ;
157 informat "[Link]"N best32. ;
158 informat "PCD Reference File.2016 Spray St"N $8. ;
159 informat "PCD Reference File.2017 Spray St"N $8. ;
160 informat "PCD Reference [Link]"N $25. ;
161 informat "[Link]"N best32. ;
162 informat "PCD Reference [Link]"N $6. ;
163 informat "[Link]"N best32. ;
164 informat "[Link]"N best32. ;
165 informat "[Link]"N best32. ;
166 informat "[Link]"N best32. ;
167 informat "PCD Reference [Link]"N best32. ;
168 informat "PCD Reference [Link]"N best32. ;
169 informat "PCD Reference [Link] Healt"N $30. ;
170 informat "PCD Reference [Link] To Closest"N best32. ;
171 format DEMOGRAFIC_GENDER best12. ;
172 format "[Link]"N best12. ;
173 format MAIN_HAD_MALARIA best12. ;
174 format "[Link]"N best12. ;
175 format MAIN_WRITE best12. ;
176 format "[Link]"N best12. ;
177 format "[Link]"N best12. ;
178 format "[Link] plastic"N best12. ;
179 format "[Link] covered with sand"N best12. ;
180 format "[Link] bark"N best12. ;
181 format "[Link] and zinc"N best12. ;
182 format "[Link] bricks"N best12. ;
183 format "[Link]"N best12. ;
184 format "[Link] block"N best12. ;
185 format "[Link]"N best12. ;
186 format MAIN_ADMIN_TIME best12. ;
187 format MAIN_ROOF best12. ;
188 format "[Link]"N best12. ;
189 format "[Link]"N best12. ;
190 format "[Link]"N best12. ;
191 format "[Link]"N best12. ;
192 format "[Link]"N best12. ;
193 format "[Link]"N best12. ;
194 format "[Link]"N best12. ;
195 format MAIN_OCUPATION best12. ;
196 format "[Link]"N best12. ;
197 format "[Link]"N best12. ;
198 format "[Link]"N best12. ;
199 format "[Link]"N best12. ;
200 format "[Link]"N best12. ;
201 format "[Link]"N best12. ;
202 format "[Link]"N best12. ;
about:blank 4/23
5/15/25, 12:13 PM Program Summary - [Link]
203 format "[Link]"N best12. ;
204 format PERM_ID $16. ;
205 format CLUSTER_ID best12. ;
206 format "[Link]"N best12. ;
207 format MAIN_HF_TRAV_TIME best12. ;
208 format MAIN_EDUCATION best12. ;
209 format "[Link]"N best12. ;
210 format "Ed.EP1"N best12. ;
211 format "Ed.EP2"N best12. ;
212 format "Ed.ESG1"N best12. ;
213 format "Ed.ESG2"N best12. ;
214 format "[Link]"N best12. ;
215 format "[Link] basico"N best12. ;
216 format "[Link] Medio"N best12. ;
217 format "[Link]"N best12. ;
218 format "[Link]"N best12. ;
219 format "[Link]"N best12. ;
220 format FAMILY_ID $12. ;
221 format DEMOGRAFIC_DATE_VISIT datetime. ;
222 format AGE_GROUP best12. ;
223 format "Age.u5"N best12. ;
224 format "Age.o5"N best12. ;
225 format VILLAGE_ID best12. ;
226 format "[Link]"N best12. ;
227 format MAIN_MALARIA_CONTROL_HAS_NETS best12. ;
228 format MAIN_MALARIA_CONTROL_NET_COUNT best12. ;
229 format "[Link].48"N best12. ;
230 format "[Link]"N best12. ;
231 format "[Link]"N best12. ;
232 format MAIN_CLINIC_DATA_SAMPLES_TEST_RE best12. ;
233 format MAIN_MALARIA_CONTROL_NETS best12. ;
234 format MAIN_MALARIA_CONTROL_MEASURES_LA best12. ;
235 format "[Link]"N best12. ;
236 format "[Link]"N best12. ;
237 format "[Link]"N best12. ;
238 format "[Link]"N best12. ;
239 format "PCD Reference File.2016 Spray St"N $8. ;
240 format "PCD Reference File.2017 Spray St"N $8. ;
241 format "PCD Reference [Link]"N $25. ;
242 format "[Link]"N best12. ;
243 format "PCD Reference [Link]"N $6. ;
244 format "[Link]"N best12. ;
245 format "[Link]"N best12. ;
246 format "[Link]"N best12. ;
247 format "[Link]"N best12. ;
248 format "PCD Reference [Link]"N best12. ;
249 format "PCD Reference [Link]"N best12. ;
250 format "PCD Reference [Link] Healt"N $30. ;
251 format "PCD Reference [Link] To Closest"N best12. ;
252 input
253 DEMOGRAFIC_GENDER
254 "[Link]"N
255 MAIN_HAD_MALARIA
256 "[Link]"N
257 MAIN_WRITE
258 "[Link]"N
259 "[Link]"N
260 "[Link] plastic"N
261 "[Link] covered with sand"N
262 "[Link] bark"N
263 "[Link] and zinc"N
264 "[Link] bricks"N
265 "[Link]"N
266 "[Link] block"N
267 "[Link]"N
268 MAIN_ADMIN_TIME
269 MAIN_ROOF
270 "[Link]"N
271 "[Link]"N
272 "[Link]"N
273 "[Link]"N
274 "[Link]"N
275 "[Link]"N
276 "[Link]"N
277 MAIN_OCUPATION
278 "[Link]"N
279 "[Link]"N
280 "[Link]"N
281 "[Link]"N
282 "[Link]"N
283 "[Link]"N
284 "[Link]"N
285 "[Link]"N
286 PERM_ID $
287 CLUSTER_ID
288 "[Link]"N
289 MAIN_HF_TRAV_TIME
290 MAIN_EDUCATION
about:blank 5/23
5/15/25, 12:13 PM Program Summary - [Link]
291 "[Link]"N
292 "Ed.EP1"N
293 "Ed.EP2"N
294 "Ed.ESG1"N
295 "Ed.ESG2"N
296 "[Link]"N
297 "[Link] basico"N
298 "[Link] Medio"N
299 "[Link]"N
300 "[Link]"N
301 "[Link]"N
302 FAMILY_ID $
303 DEMOGRAFIC_DATE_VISIT
304 AGE_GROUP
305 "Age.u5"N
306 "Age.o5"N
307 VILLAGE_ID
308 "[Link]"N
309 MAIN_MALARIA_CONTROL_HAS_NETS
310 MAIN_MALARIA_CONTROL_NET_COUNT
311 "[Link].48"N
312 "[Link]"N
313 "[Link]"N
314 MAIN_CLINIC_DATA_SAMPLES_TEST_RE
315 MAIN_MALARIA_CONTROL_NETS
316 MAIN_MALARIA_CONTROL_MEASURES_LA
317 "[Link]"N
318 "[Link]"N
319 "[Link]"N
320 "[Link]"N
321 "PCD Reference File.2016 Spray St"N $
322 "PCD Reference File.2017 Spray St"N $
323 "PCD Reference [Link]"N $
324 "[Link]"N
325 "PCD Reference [Link]"N $
326 "[Link]"N
327 "[Link]"N
328 "[Link]"N
329 "[Link]"N
330 "PCD Reference [Link]"N
331 "PCD Reference [Link]"N
332 "PCD Reference [Link] Healt"N $
333 "PCD Reference [Link] To Closest"N
334 ;
335 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */
336 run;
about:blank 6/23
5/15/25, 12:13 PM Program Summary - [Link]
Timestamp 05/15/2025 06:43:24 AM
Step Count 141 Switch Count 17
Page Faults 0
Page Reclaims 1428
Page Swaps 0
Voluntary Context Switches 136
Involuntary Context Switches 4
Block Input Operations 0
Block Output Operations 1400
337
338
339 /* STEP 2: CLEANING & VARIABLE CREATION */
340 data mopeia;
341 set mopeia_raw;
342
343 /* EXCLUSIONS: Remove missing RDT or spray status */
344 if missing('[Link]'n) or missing('PCD Reference File.2017 Spray St'n) then delete;
345
346 /* OUTCOME: Malaria (RDT positive) */
347 MalariaPos = '[Link]'n;
348
349 /* EXPOSURE: IRS in 2017 */
350 if 'PCD Reference File.2017 Spray St'n = 'Spray' then IRSsprayed = 1;
351 else if 'PCD Reference File.2017 Spray St'n = 'No_Spray' then IRSsprayed = 0;
352 else IRSsprayed = .;
353
354 /* BEDNET OWNERSHIP */
355 if 'MAIN_MALARIA_CONTROL_HAS_NETS'n = 1 then BedNet = 1;
356 else if 'MAIN_MALARIA_CONTROL_HAS_NETS'n = 2 then BedNet = 0;
357 else BedNet = .;
358
359 /* AGE GROUP (already categorized) */
360 AgeGroup = AGE_GROUP;
361
362 /* GENDER */
363 Gender = DEMOGRAFIC_GENDER;
364
365 /* LITERACY */
366 ReadAble = '[Link]'n;
367 WriteAble = '[Link]'n;
368 if ReadAble = 1 and WriteAble = 1 then Literate = 1;
369 else if ReadAble = 2 or WriteAble = 2 then Literate = 0;
370 else Literate = 0;
371
372 /* HOUSING VARIABLES */
373 MetalRoof = '[Link]'n;
374 DurableWall = ('[Link] bricks'n = 1 or '[Link] block'n = 1);
375
376 /* LABELS FOR CLARITY */
377 label MalariaPos = "Malaria RDT Positive"
378 IRSsprayed = "IRS Sprayed (2017)"
379 BedNet = "Household Owns Bed Net"
380 AgeGroup = "Age Group"
381 Gender = "Gender"
382 Literate = "Can Read and Write"
383 MetalRoof = "Zinc Roof"
384 DurableWall = "Durable Walls";
385
386 keep MalariaPos IRSsprayed BedNet AgeGroup Gender Literate MetalRoof DurableWall;
387 run;
NOTE: There were 805 observations read from the data set WORK.MOPEIA_RAW.
NOTE: The data set [Link] has 786 observations and 8 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 1875.93k
OS Memory 30512.00k
Timestamp 05/15/2025 06:43:24 AM
Step Count 142 Switch Count 2
Page Faults 0
Page Reclaims 203
Page Swaps 0
Voluntary Context Switches 10
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 272
388
389
390 /* STEP 3: EXPORT CLEAN DATASET FOR ANALYSIS */
391 libname save '/home/u64151009/sasuser.v94/ZWhite/Files';
NOTE: Libref SAVE was successfully assigned as follows:
Engine: V9
about:blank 7/23
5/15/25, 12:13 PM Program Summary - [Link]
Physical Name: /home/u64151009/sasuser.v94/ZWhite/Files
392
393 data save.clean_mopeia;
394 set mopeia;
395
396
397 /* STEP 4: DESCRIPTIVE ANALYSIS */
398
399 /* 4a. Distributions */
NOTE: There were 786 observations read from the data set [Link].
NOTE: The data set SAVE.CLEAN_MOPEIA has 786 observations and 8 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 1059.06k
OS Memory 30128.00k
Timestamp 05/15/2025 06:43:24 AM
Step Count 143 Switch Count 1
Page Faults 0
Page Reclaims 107
Page Swaps 0
Voluntary Context Switches 34
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264
NOTE: There were 786 observations read from the data set [Link].
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.04 seconds
user cpu time 0.04 seconds
system cpu time 0.01 seconds
memory 1962.03k
OS Memory 30128.00k
Timestamp 05/15/2025 06:43:24 AM
Step Count 144 Switch Count 3
Page Faults 0
Page Reclaims 119
Page Swaps 0
Voluntary Context Switches 22
Involuntary Context Switches 2
Block Input Operations 0
Block Output Operations 288
404
405 /* 4b. Table 1: Stratified by IRSsprayed */
406 proc freq data=mopeia;
407 tables IRSsprayed*(MalariaPos BedNet AgeGroup Gender Literate MetalRoof DurableWall)
408 / chisq norow nocol nopercent;
409 title "Table 1: Baseline Characteristics by IRSsprayed";
410 run;
NOTE: There were 786 observations read from the data set [Link].
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.13 seconds
user cpu time 0.13 seconds
system cpu time 0.00 seconds
memory 1694.56k
OS Memory 30388.00k
Timestamp 05/15/2025 06:43:24 AM
Step Count 145 Switch Count 5
Page Faults 0
Page Reclaims 185
Page Swaps 0
Voluntary Context Switches 39
Involuntary Context Switches 2
Block Input Operations 0
Block Output Operations 592
411
412
413 /* STEP 5: BIVARIATE ASSOCIATIONS */
414 proc freq data=mopeia;
415 tables BedNet*MalariaPos / chisq relrisk;
416 title "Malaria and BedNet Ownership";
417 run;
NOTE: There were 786 observations read from the data set [Link].
NOTE: PROCEDURE FREQ used (Total process time):
about:blank 8/23
5/15/25, 12:13 PM Program Summary - [Link]
real time 0.03 seconds
user cpu time 0.03 seconds
system cpu time 0.00 seconds
memory 1187.31k
OS Memory 30388.00k
Timestamp 05/15/2025 06:43:24 AM
Step Count 146 Switch Count 5
Page Faults 0
Page Reclaims 185
Page Swaps 0
Voluntary Context Switches 38
Involuntary Context Switches 2
Block Input Operations 0
Block Output Operations 544
418
419 proc freq data=mopeia;
420 tables IRSsprayed*MalariaPos / chisq relrisk;
421 title "Malaria and IRS Spraying";
422 run;
NOTE: There were 786 observations read from the data set [Link].
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.03 seconds
user cpu time 0.03 seconds
system cpu time 0.01 seconds
memory 1184.65k
OS Memory 30388.00k
Timestamp 05/15/2025 06:43:24 AM
Step Count 147 Switch Count 5
Page Faults 0
Page Reclaims 185
Page Swaps 0
Voluntary Context Switches 40
Involuntary Context Switches 3
Block Input Operations 0
Block Output Operations 544
423
424 proc freq data=mopeia;
425 tables AgeGroup*MalariaPos Gender*MalariaPos Literate*MalariaPos
426 MetalRoof*MalariaPos DurableWall*MalariaPos / chisq;
427 title "Other Variables and Malaria Status";
428 run;
NOTE: There were 786 observations read from the data set [Link].
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.11 seconds
user cpu time 0.11 seconds
system cpu time 0.00 seconds
memory 1340.93k
OS Memory 30388.00k
Timestamp 05/15/2025 06:43:24 AM
Step Count 148 Switch Count 5
Page Faults 0
Page Reclaims 185
Page Swaps 0
Voluntary Context Switches 36
Involuntary Context Switches 3
Block Input Operations 0
Block Output Operations 576
429
430
431 /* STEP 6: LOGISTIC REGRESSION */
432
433 /* 6a. Unadjusted: IRSsprayed only */
434 proc logistic data=mopeia descending plots(only)=roc;
435 class IRSsprayed (ref='0') / param=ref;
436 model MalariaPos = IRSsprayed / clodds=wald lackfit outroc=roc1;
437 title "Unadjusted Model: IRSsprayed → Malaria";
438 run;
about:blank 9/23
5/15/25, 12:13 PM Program Summary - [Link]
Timestamp 05/15/2025 06:43:24 AM
Step Count 149 Switch Count 3
Page Faults 0
Page Reclaims 2215
Page Swaps 0
Voluntary Context Switches 229
Involuntary Context Switches 3
Block Input Operations 0
Block Output Operations 1032
439
440 /* 6b. Adjusted model */
441 proc logistic data=mopeia descending plots(only)=roc;
442 class IRSsprayed (ref='0')
443 BedNet (ref='0')
444 AgeGroup (ref='1')
445 Gender (ref='1')
446 Literate (ref='0')
447 MetalRoof (ref='0')
448 DurableWall (ref='0')
449 / param=ref;
450 model MalariaPos = IRSsprayed BedNet AgeGroup Gender Literate MetalRoof DurableWall
451 / clodds=wald lackfit outroc=roc2;
452 title "Adjusted Logistic Model: IRSsprayed & Covariates";
453 run;
454
455
456 /* STEP 7: INTERACTIONS & MODEL DIAGNOSTICS */
457
458 /* IRSsprayed × BedNet */
459 proc logistic data=mopeia descending;
460 class IRSsprayed (ref='0')
461 BedNet (ref='0')
462 AgeGroup (ref='1')
463 Gender (ref='1')
464 Literate (ref='0')
465 MetalRoof (ref='0')
466 DurableWall (ref='0')
467 / param=ref;
468 model MalariaPos = IRSsprayed|BedNet AgeGroup Gender Literate MetalRoof DurableWall
469 / clodds=wald lackfit;
470 title "Interaction: IRSsprayed × BedNet";
471 run;
about:blank 10/23
5/15/25, 12:13 PM Program Summary - [Link]
Block Input Operations 0
Block Output Operations 472
472
473 /* Goodness-of-fit and ROC */
474 ods graphics on;
475 ods select FitStatistics Association LackFitChiSq;
476 proc logistic data=mopeia descending plots(only)=roc(id=prob);
477 class IRSsprayed (ref='0')
478 BedNet (ref='0')
479 AgeGroup (ref='1')
480 Gender (ref='1')
481 Literate (ref='0')
482 MetalRoof (ref='0')
483 DurableWall (ref='0')
484 / param=ref;
485 model MalariaPos = IRSsprayed BedNet AgeGroup Gender Literate MetalRoof DurableWall
486 / clodds=wald lackfit rsquare;
487 title "Model Diagnostics: Fit, ROC, HL Test";
488 run;
489
490
491 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
501
Results: [Link]
Age Group
Cumulative Cumulative
AgeGroup Frequency Percent Frequency Percent
1 384 48.85 384 48.85
2 59 7.51 443 56.36
3 343 43.64 786 100.00
Gender
Cumulative Cumulative
Gender Frequency Percent Frequency Percent
1 404 51.40 404 51.40
about:blank 11/23
5/15/25, 12:13 PM Program Summary - [Link]
Gender
Cumulative Cumulative
Gender Frequency Percent Frequency Percent
2 382 48.60 786 100.00
Zinc Roof
Cumulative Cumulative
MetalRoof Frequency Percent Frequency Percent
0 634 80.66 634 80.66
1 152 19.34 786 100.00
Durable Walls
Cumulative Cumulative
DurableWall Frequency Percent Frequency Percent
0 417 53.05 417 53.05
1 369 46.95 786 100.00
about:blank 12/23
5/15/25, 12:13 PM Program Summary - [Link]
Fisher's Exact Test
Table Probability (P) 0.0964
Two-sided Pr <= P 0.5269
about:blank 13/23
5/15/25, 12:13 PM Program Summary - [Link]
Fisher's Exact Test
Two-sided Pr <= P 0.4249
about:blank 14/23
5/15/25, 12:13 PM Program Summary - [Link]
Statistic DF Value Prob
Chi-Square 1 0.4367 0.5087
Likelihood Ratio Chi-Square 1 0.4308 0.5116
Continuity Adj. Chi-Square 1 0.2475 0.6188
Mantel-Haenszel Chi-Square 1 0.4362 0.5090
Phi Coefficient -0.0236
Contingency Coefficient 0.0236
Cramer's V -0.0236
about:blank 15/23
5/15/25, 12:13 PM Program Summary - [Link]
Table of AgeGroup by MalariaPos
MalariaPos(Malaria RDT Positive)
AgeGroup(Age Group) 0 1 Total
7.80 7.02
3 273 70 343
34.73 8.91 43.64
79.59 20.41
56.06 23.41
Total 487 299 786
61.96 38.04 100.00
about:blank 16/23
5/15/25, 12:13 PM Program Summary - [Link]
Fisher's Exact Test
Right-sided Pr >= F 0.6438
Model Information
Data Set [Link]
Response Variable MalariaPos Malaria RDT Positive
about:blank 17/23
5/15/25, 12:13 PM Program Summary - [Link]
Model Information
Number of Response Levels 2
Model binary logit
Optimization Technique Fisher's scoring
Response Profile
Ordered Total
Value MalariaPos Frequency
1 1 299
2 0 487
about:blank 18/23
5/15/25, 12:13 PM Program Summary - [Link]
Model Information
Data Set [Link]
Response Variable MalariaPos Malaria RDT Positive
Number of Response Levels 2
Model binary logit
Optimization Technique Fisher's scoring
Response Profile
Ordered Total
Value MalariaPos Frequency
1 1 299
2 0 487
about:blank 19/23
5/15/25, 12:13 PM Program Summary - [Link]
Model Fit Statistics
Criterion Intercept Only Intercept and Covariates
-2 Log L 1044.222 935.584
about:blank 20/23
5/15/25, 12:13 PM Program Summary - [Link]
Model Information
Data Set [Link]
Response Variable MalariaPos Malaria RDT Positive
Number of Response Levels 2
Model binary logit
Optimization Technique Fisher's scoring
Response Profile
Ordered Total
Value MalariaPos Frequency
1 1 299
2 0 487
about:blank 21/23
5/15/25, 12:13 PM Program Summary - [Link]
Class Level Information
Class Value Design Variables
3 0 1
Gender 1 0
2 1
Literate 0 0
1 1
MetalRoof 0 0
1 1
DurableWall 0 0
1 1
Joint Tests
Wald
Effect DF Chi-Square Pr > ChiSq
IRSsprayed 1 1.6502 0.1989
BedNet 1 1.1326 0.2872
IRSsprayed*BedNet 1 3.9238 0.0476
AgeGroup 2 84.4534 <.0001
Gender 1 0.0418 0.8379
Literate 1 0.7165 0.3973
MetalRoof 1 7.5786 0.0059
DurableWall 1 0.0660 0.7972
Note: Under full-rank parameterizations, Type 3 effect tests are replaced by joint tests. The joint test for an effect is a test that all the parameters associated with that effect are zero. Such joint tests might not be equivalent to
Type 3 effect tests under GLM parameterization.
about:blank 22/23
5/15/25, 12:13 PM Program Summary - [Link]
about:blank 23/23