You can install the released version of predtools from CRAN with:
install.packages("predtools")
And the development version from GitHub with:
# install.packages("remotes")
remotes::install_github("resplab/predtools")
The function calibration_plot
takes observed and predicted values from a prediction model and uses ggplot2 to produce a calibration plot:
library(predtools)
library(dplyr)
<- rnorm(100, 10, 2)
x <- x + rnorm(100,0, 1)
y <- tibble(x,y)
data calibration_plot(data, obs = "x", pred_1 = "y")
See vignettes for more advanced functionalities, including model-based ROC, intercept adjustment, calibration plot, and unit normal loss integral in two dimensions.
You can also access the vignettes from R:
browseVignettes("predtools")