View source: R/GLM_functions.R
brier | R Documentation |
Computes the Brier score (average prediction error) for a logistic regression model, which is a measure of overall accuracy.
brier(x, scaled = TRUE, digits = NULL)
x |
A logistic regression model fit via glm(family = binomial). |
scaled |
A logical value that controls whether the to return the scaled Brier score (if TRUE, the default) or the unscaled score (if FALSE). |
digits |
An integer specifying the number of decimal places to used when rounding the result. Defaults to NULL, which does not round the result. |
=============================================================================
The Brier score is a measure of overall accuracy for a logistic regression model; it is the average prediction error. It can be computed in unscaled or scaled form. The scaled Brier score ranges from [0, 1]. A perfect model will have a value of 0, while a noninformative model will have a value of 1. The unscaled score can range from [0, 0.25] if the incidence of the outcome is 50
Numeric values for the Brier score and the scaled Brier score.
Steyerberg, E. W., Harrell Jr., F. E., Borsboom, G. J. J. M., Eijkemans, M. J. C., Vergouwe, Y., & Habbema, J. D. F. (2001). Internal validation of predictive models: Efficiency of some procedures for logistic regression analysis. Journal of Clinical Epidemiology, 54(8), 774-781. doi:10.1016/S0895-4356(01)00341-9
Steyerberg, E. W., Vickers, A. J., Cook, N. R., Gerds, T., Gonen, M., Obuchowski, N. A., . . . Kattan, M. W. (2010). Assessing the performance of prediction models : A framework for traditional and novel measures. Epidemiology, 21(1), 128-138. doi:10.1097/EDE.0b013e3181c30fb2
m1 <- glm(formula = vs ~ wt + disp, family = binomial, data = mtcars)
brier(m1)
brier(m1, digits = 2)
brier(m1, scaled = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.