Diff for "FAQ/roc" - CBU statistics Wiki
location: Diff for "FAQ/roc"
Differences between revisions 1 and 11 (spanning 10 versions)
Revision 1 as of 2007-01-05 10:26:07
Size: 225
Editor: PeterWatson
Comment:
Revision 11 as of 2007-04-27 10:20:34
Size: 2361
Editor: PeterWatson
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Plotting ROC curves ==
Line 4: Line 5:
In the example data below is collected to assess how well a cases's test score and sex can predict if the case is a control or a patient (the group).
 
||||<33% style="TEXT-ALIGN: center"> Group || Score || Sex ||
||||<33% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 1 || 12 || 1 ||
||||<33% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 1 || 15 || 2 ||
||||<33% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 1 || 23 || 1 ||
||||<33% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 1 || 16 || 2 ||
||||<33% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 1 || 10 || 2 ||
||||<33% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 0 || 24 || 1 ||
||||<33% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 0 || 34 || 1 ||
||||<33% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 0 || 21 || 1 ||
||||<33% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 0 || 25 || 2 ||
||||<33% style="VERTICAL-ALIGN: top; TEXT-ALIGN: center"> 0 || 9 || 2 ||
Line 5: Line 19:
Binary logistic regression can be used to produce estimates of group membership based on test score and sex and compared to the observed "true" group using a classification table. (Correct and incorrect classification probabilities may be obtained from [http://imaging.mrc-cbu.cam.ac.uk/statswiki/FAQ/criteria: this table.]
Two of these diagnostics may then be plotted by a ROC curve (available in the graph menu) using the ''predicted'' group membership probabilities using score and sex as predictors which can be outputted from the logistic regression procedure. The syntax in the box below does the ROC analysis.
Line 6: Line 22:
There is no ROC analysis for more than two groups but an assessment of fit could be carried out by obtaining a classification table or predicted versus observed groups from a multinomial or ordinal logistic regression procedure.
Line 7: Line 24:
{{{
LOGISTIC REGRESSION VAR=group
  /METHOD=ENTER score sex
  /SAVE PRED (pred)
  /CRITERIA PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
Line 8: Line 30:
ROC pred by group(1)
/MISSING = EXCLUDE
/PLOT = CURVE
/PRINT = SE COORDINATES.
}}}
Line 9: Line 36:






The bigger the area under the ROC curve the better the prediction.

Plotting ROC curves

The Receiver Operating Characteristic (ROC) curve is a graph which illustrates just how well a set of predictor variables, measured on various cases, predict the group to which that case belongs.

In the example data below is collected to assess how well a cases's test score and sex can predict if the case is a control or a patient (the group).

Group

Score

Sex

1

12

1

1

15

2

1

23

1

1

16

2

1

10

2

0

24

1

0

34

1

0

21

1

0

25

2

0

9

2

Binary logistic regression can be used to produce estimates of group membership based on test score and sex and compared to the observed "true" group using a classification table. (Correct and incorrect classification probabilities may be obtained from [http://imaging.mrc-cbu.cam.ac.uk/statswiki/FAQ/criteria: this table.] Two of these diagnostics may then be plotted by a ROC curve (available in the graph menu) using the predicted group membership probabilities using score and sex as predictors which can be outputted from the logistic regression procedure. The syntax in the box below does the ROC analysis.

There is no ROC analysis for more than two groups but an assessment of fit could be carried out by obtaining a classification table or predicted versus observed groups from a multinomial or ordinal logistic regression procedure.

LOGISTIC REGRESSION VAR=group
  /METHOD=ENTER score sex
  /SAVE PRED (pred)
  /CRITERIA PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .

ROC pred by group(1)
/MISSING = EXCLUDE
/PLOT = CURVE
/PRINT = SE COORDINATES.

The bigger the area under the ROC curve the better the prediction.

None: FAQ/roc (last edited 2016-08-17 13:59:45 by PeterWatson)