Description Usage Arguments Details Value References See Also Examples

The function produces ROC curve and corresponding AUC value with 95% CI. The function can plot one or multiple ROC curves in a single plot.

1 2 |

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

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

`predrisk` |
Vector of predicted risk. When multiple curves need to
be presented in one plot, specify multiple vectors of predicted
risks as |

`labels` |
Label(s) given to the ROC curve(s). Specification of |

`plottitle` |
Title of the plot. Specification of |

`xlabel` |
Label of x-axis. Specification of |

`ylabel` |
Label of y-axis. Specification of |

`fileplot` |
Name of the output file that contains the plot. The file is
saved in the working directory in the format specified under |

`plottype` |
The format in which the plot is saved. Available formats are
wmf, emf, png, jpg, jpeg, bmp, tif, tiff, ps,
eps or pdf. For example, |

The function requirs predicted risks or risk scores and the outcome of
interest for all individuals.
Predicted risks can be obtained using the functions
`fitLogRegModel`

and `predRisk`

or be imported from other methods or packages.

The function creates ROC plot and returns AUC value with 95% CI.

Hanley JA, McNeil BJ. The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology 1982;143:29-36.

Tobias Sing, Oliver Sander, Niko Beerenwinkel, Thomas Lengauer. ROCR: visualizing classifier performance in R. Bioinformatics 2005;21(20):3940-3941.

`predRisk`

, `plotRiskDistribution`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ```
# specify the arguments in the function to produce ROC plot
# 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 label of the ROC curve
labels <- c("without genetic factors", "with genetic factors")
# produce ROC curve
plotROC(data=ExampleData, cOutcome=cOutcome,
predrisk=cbind(predRisk1,predRisk2), labels=labels)
``` |

PredictABEL documentation built on May 29, 2017, 4:17 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.