
i
i
“K23166” — 2015/1/28 — 9:35 — page 138 — #164
i
i
i
i
i
i
138 CHAPTER 8. A GRAPHICAL COMPENDIUM
> with(ds, scatterhist(mcs, pcs, xlab="MCS", ylab="PCS"))
n = 453
10 20 30 40 50 60
20 30 40 50 60 70
MCS
PCS
Figure 8.4: Association of MCS and PCS with marginal histograms
8.7.5 ROC curve
Receiver operating characteristic (ROC) curves are used for diagnostic agreement (5.2.2
and 8.5.7) as well as assessing goodness of fit for logistic regression (7.1.1). These are easily
created using the ROCR package. Figure 8.6 displays the receiver operating characteristic
curve predicting suicidal thoughts using the CESD measure of depressive symptoms.
We first load the ROCR