*********************************************************************** * In the ACRN SOCS trial, the investigators wanted to determine if * * low values of the methacholine PC20 at baseline are predictive of * * significant asthma exacerbations. This program illustrates the use * * PROC LOGISTIC to develop the ROC curve. * ***********************************************************************; proc format; value noyesfmt 0='no ' 1='yes'; value posfmt 1='positive' 2='negative'; value negfmt 1='negative' 2='positive'; run; data acrn_socs; input subject sigex meth_pc20; log2_meth_pc20=log2(meth_pc20); if meth_pc20^=.; cards; 3 0 1.820 8 1 2.050 10 1 0.123 12 0 . 13 0 0.429 14 1 1.350 16 0 0.270 18 0 0.300 22 0 1.660 23 0 0.720 32 0 1.970 33 1 0.737 34 0 1.150 35 0 0.300 37 0 12.900 39 0 0.255 41 0 1.630 42 1 0.625 44 0 0.139 48 1 0.698 49 0 0.270 52 0 0.156 58 0 4.040 64 0 0.252 67 0 3.450 68 1 0.670 70 0 0.399 74 0 0.099 80 0 0.425 82 0 0.267 84 1 0.000 86 1 0.973 87 1 0.492 88 1 5.350 91 0 0.271 92 0 0.561 95 0 0.236 99 0 1.920 100 0 0.438 103 0 2.500 104 1 0.305 106 0 0.866 107 1 1.250 108 0 2.420 109 0 0.331 112 1 1.440 121 0 0.816 122 0 4.410 125 0 0.156 128 0 1.430 131 1 0.967 136 0 3.080 139 0 2.390 143 1 0.129 145 0 16.600 152 0 1.170 153 1 0.395 154 0 0.236 155 0 1.750 162 0 1.330 163 0 5.302 166 0 1.420 168 1 0.193 176 1 0.145 177 1 0.581 179 1 0.596 181 0 0.284 182 1 0.778 183 1 0.156 187 0 4.050 188 0 3.670 190 0 3.050 191 1 0.607 193 0 5.870 195 0 1.880 199 0 2.880 200 0 4.240 204 0 0.711 206 1 . 210 0 2.930 212 0 0.365 213 0 1.430 215 0 0.078 217 0 0.336 218 0 3.340 220 0 0.984 227 0 1.330 229 0 5.180 234 1 11.700 238 1 0.974 245 0 0.411 247 0 0.625 248 0 0.594 253 0 0.509 254 0 1.110 256 0 . 258 0 0.162 259 0 8.080 260 0 0.868 261 1 1.790 266 0 0.150 267 0 1.880 268 0 2.610 270 0 0.501 275 0 3.960 276 1 3.890 277 0 0.512 278 0 0.327 283 0 0.551 284 0 5.970 287 1 0.685 290 0 1.400 291 0 3.310 295 1 0.301 296 0 1.920 299 0 5.790 302 0 0.541 309 1 0.299 310 0 9.250 312 0 0.137 315 0 . 316 0 0.135 318 0 0.581 321 1 3.890 322 1 12.600 323 0 0.517 327 0 1.400 328 1 0.204 329 1 0.135 330 0 1.890 333 0 0.173 335 1 0.612 339 0 4.300 341 0 0.387 342 0 0.625 343 0 0.460 344 0 0.990 345 0 0.143 347 0 0.247 349 1 0.337 353 0 0.216 354 0 8.980 366 0 3.490 368 0 1.040 375 0 0.740 376 0 0.480 380 1 0.252 382 0 1.680 384 0 1.720 387 1 1.520 390 0 0.353 391 0 4.720 394 0 2.000 396 0 0.264 399 0 0.145 400 0 1.950 402 0 5.000 403 0 1.140 404 0 1.040 411 0 0.977 414 0 0.112 416 0 0.614 419 1 1.590 421 0 0.185 ; run; proc print data=acrn_socs; run; ods graphics on; proc logistic data=acrn_socs descending order=internal plots(only)=(roc(id=obs) effect); model sigex=log2_meth_pc20; run; ods graphics off; data sensitivity; set acrn_socs; if sigex=1; if meth_pc20<=0.612 then test=1; if meth_pc20>0.612 then test=2; format test posfmt.; run; proc freq data=sensitivity; tables test/binomial alpha=0.05; title "Exact and Asymptotic 95% Confidence Intervals for Sensitivity"; run; data specificity; set acrn_socs; if sigex=0; if meth_pc20<=0.612 then test=2; if meth_pc20>0.612 then test=1; format test negfmt.; run; proc freq data=specificity; tables test/binomial alpha=0.05; title "Exact and Asymptotic 95% Confidence Intervals for Specificity"; run;