View source: R/proj2_wtRecal.R
| stdRecal | R Documentation |
Produces recalibration intercept, slope and corresponding recalibrated risk scores using standard logistic rexalibration. Recalibration slope and intercept using logistic recalibration method, develop by Cox (1958), then used to calculated the recalibrated risk score
stdRecal(y,p)
y |
Vector of binary outcomes, with 1 indicating event (case) and 0 indicating no event (controls) |
p |
Vector of risk score values |
stdRisk |
Vector of recalibrated risks under standard logistic recalibration |
alpha |
Two-element vector containing logistic recalibration intercept and slope |
Anu Mishra
Cox, D. R. (1958). Two further applications of a model for binary regression. Biometrika, 45(3/4), 562-565.
Harrell Jr, F. E. (2015). Regression modeling strategies: with applications to linear models, logistic and ordinal regression, and survival analysis. Springer.
#load data
data(fakeData)
res <- stdRecal(p=fakeData$p, y =fakeData$y)
p.std <- res$stdRecal
coef.dt <- res$alpha
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.