lowess_cal | R Documentation |
lowess
uses lowess
with iter
= 0; as done in the rms
package
lowess_cal(p, y, x, xp, save_data = TRUE)
p |
predicted probabilities |
y |
binary outcome |
x |
predictor (could be transformation of |
xp |
values for plotting (same scale as |
save_data |
whether to save y, p, x, xp in the returned object |
list of class lowess_cal
library(pmcalibration)
# simulate some data
n <- 500
dat <- sim_dat(N = n, a1 = .5, a3 = .2)
# predictions
p <- with(dat, invlogit(.5 + x1 + x2 + x1*x2*.1))
lowess_cal(y = dat$y, p = p, x = p, xp = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.