plotPredictivenessCurve {PredictABEL} | R Documentation |
Function for predictiveness curve.
Description
The function creates a plot of cumulative percentage of individuals to the predicted risks.
Usage
plotPredictivenessCurve(predrisk, rangeyaxis, labels, plottitle,
xlabel, ylabel, fileplot, plottype)
Arguments
predrisk |
Vector of predicted risk. When multiple curves need to
be presented in one plot, specify multiple vectors of predicted
risks as |
rangeyaxis |
Range of the y axis. Default |
labels |
Label(s) given to the predictiveness 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, |
Details
The Predictiveness curve is a plot of cumulative percentage
of individuals to the predicted risks. Cumulative percentage indicates
the percentage of individual that has a predicted risk equal or lower
than the risk value.
Predicted risks can be obtained using the functions
fitLogRegModel
and predRisk
or be imported from other methods or packages.
Value
The function creates a predictiveness curve.
References
Pepe MS, Feng Z, Huang Y, et al. Integrating the predictiveness of a marker with its performance as a classifier. Am J Epidemiol 2008;167:362-368.
See Also
Examples
# specify dataset with outcome and predictor variables
data(ExampleData)
# 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 range of y-axis
rangeyaxis <- c(0,1)
# specify labels of the predictiveness curves
labels <- c("without genetic factors", "with genetic factors")
# produce predictiveness curves
plotPredictivenessCurve(predrisk=cbind(predRisk1,predRisk2),
rangeyaxis=rangeyaxis, labels=labels)