Description Usage Arguments Details Value References See Also Examples
The function creates a plot of cumulative percentage of individuals to the predicted risks.
1 2  | plotPredictivenessCurve(predrisk, rangeyaxis, labels, plottitle, 
xlabel, ylabel, fileplot, plottype)
 | 
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,   | 
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.
The function creates a predictiveness curve.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  | # 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)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.