Description Usage Arguments Value References Examples

This function computes positive predictive values (PPV) and negative predictive values (NPV) with provided base rates (or known prevalence).

1 | ```
PV.BR(outcome, predictor,cut.off='max.Youden', BR=1)
``` |

`outcome` |
The outcome variable indicating the status in the form of a data frame or matrix. This variable is typically coded as 0 (positive) and 1 (negative). |

`predictor` |
A numerical vector of scores used to predict the status of the outcome. This variable should be of the same length as the outcome variable (i.e., two variables are from the same data set and also of the same number of data rows). |

`cut.off` |
Specification of the criterion used to select the optimal cut score. Three options available: (1) 'max.Youden' returns the cut score that maximizes the Youden Index (the default); (2) 'max.sen' returns the cut score that maximizes the sensitivity; and (3) 'max.spe' returns the cut score that maximizes the specificity. |

`BR` |
Base rates or known prevalence. Multiple values can be specified simultaneously. By default BR=1. |

An object that contains results of classification statistics.

`Result` |
* Cut.off, the optimal cut score. |

McCaffrey R.J., Palav A.A., O’Bryant S.E., Labarge A.S. (2003). "A Brief Overview of Base Rates. In: McCaffrey R.J., Palav A.A., O’Bryant S.E., Labarge A.S. (eds) Practitioner’s Guide to Symptom Base Rates in Clinical Neuropsychology. Critical Issues in Neuropsychology. ." Springer, Boston, MA. doi:10.1007/978-1-4615-0079-7_1.

1 2 3 4 5 6 | ```
#read the example data
data(ROC.data.ex)
#run the function
PV.BR(ROC.data.ex$outcome, ROC.data.ex$predictor,
cut.off='max.Youden', BR=1)
``` |

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.