reclassification {PredictABEL} | R Documentation |

The function creates a reclassification table and provides statistics.

reclassification(data, cOutcome, predrisk1, predrisk2, cutoff)

`data` |
Data frame or matrix that includes the outcome and predictors variables. |

`cOutcome` |
Column number of the outcome variable. |

`predrisk1` |
Vector of predicted risks of all individuals using initial model. |

`predrisk2` |
Vector of predicted risks of all individuals using updated model. |

`cutoff` |
Cutoff values for risk categories.
Define the cut-off values as |

The function creates a reclassification table and computes the net
reclassification improvement (`NRI`

) and integrated discrimination
improvement (`IDI`

). A reclassification table indicates the number
of individuals who move to another risk category or remain in the same
risk category as a result of updating the risk model. NRI equal to `x%`

means that compared with individuals without outcome,
individuals with outcome were almost `x%`

more likely to move up a category than down.
IDI equal to `x%`

means that the difference in average
predicted risks between the individuals with and without the outcome
increased by `x%`

in the updated model.
The function requires predicted risks estimated by using two separate risk
models. Predicted risks can be obtained using the functions
`fitLogRegModel`

and `predRisk`

or be imported from other methods or packages.

The function returns the reclassification table, separately for individuals with and without the outcome of interest and the following measures:

`NRI` |
Net Reclassification Improvement with 95% CI and |

`IDI` |
Integrated Discrimination Improvement with 95% CI and |

Cook NR. Use and misuse of the receiver operating characteristic curve in risk prediction. Circulation 2007;115(7):928-935.

Pencina MJ, D'Agostino RB Sr, D'Agostino RB Jr, Vasan RS. Evaluating the added predictive ability of a new marker: from area under the ROC curve to reclassification and beyond. Stat Med 2008;27(2):157-172; discussion 207-212.

`plotDiscriminationBox`

, `predRisk`

# specify dataset with outcome and predictor variables data(ExampleData) # specify column number of the outcome variable cOutcome <- 2 # fit logistic regression models # all steps needed to construct a logistic regression model are written in a function # called 'ExampleModels', which is described on page 4-5 riskmodel1 <- ExampleModels()$riskModel1 riskmodel2 <- ExampleModels()$riskModel2 # obtain predicted risks predRisk1 <- predRisk(riskmodel1) predRisk2 <- predRisk(riskmodel2) # specify cutoff values for risk categories cutoff <- c(0,.10,.30,1) # compute reclassification measures reclassification(data=ExampleData, cOutcome=cOutcome, predrisk1=predRisk1, predrisk2=predRisk2, cutoff)