1
$\begingroup$

I want to draw a roc curve in SPSS and I don't know how to insert my data in SPSS. The data I have are:

             Patients     Healthy with
             with AIDS    ELISA below
             with ELISA   the 
             above the    absorbance
 ELISA       absorbance   value        Sp       Se
absorbance   
<2           88            0           0.000    1.000
2.5          86            202         0.680    0.977
3.5          79            275         0.926    0.898
4.5          72            290         0.976    0.818
5.5          57            293         0.987    0.648
9            21            295         0.993    0.239
<12          0             297         1.000    0.000
$\endgroup$

closed as off-topic by Andy W, kjetil b halvorsen, gung, Nick Cox, whuber Nov 15 '15 at 14:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – Nick Cox, whuber
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ In most programs you have a score, and a criterion (which is 0, 1). I can't understand your question though. $\endgroup$ – Jeremy Miles Nov 14 '15 at 23:16
  • 1
    $\begingroup$ +1 to @JeremyMiles. Are you simply asking how to draw an ROC curve based on the predictions in one of the latter columns? $\endgroup$ – Sean Easter Nov 14 '15 at 23:38
2
$\begingroup$

I've voted as off-topic for this site since it seems to just be about programming. But as an illustration of using the aggregate data in SPSS's ROC procedure is below. In a nutshell you have to reshape the data so the positive and negative class counts are in one column, and then weight the data.

DATA LIST FREE / Absorbance Negative Positive Sp Se.
BEGIN DATA
2           88            0           0.000    1.000
2.5          86            202         0.680    0.977
3.5          79            275         0.926    0.898
4.5          72            290         0.976    0.818
5.5          57            293         0.987    0.648
9            21            295         0.993    0.239
12          0             297         1.000    0.000
END DATA.

VARSTOCASES /MAKE Weight FROM Negative Positive
            /INDEX Outcome.
WEIGHT BY Weight.

ROC Absorbance BY Outcome (2)
  /PLOT CURVE(REFERENCE)
  /PRINT SE COORDINATES.

enter image description here

If you have the unaggregated data I have a blog post showing how to calculate the specificity, sensitivity and the precision for the dataset.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.