Calculate bootstrap intervals for the Brier score, based on a glm.

BrierScoreCI(
  object,
  scaled = FALSE,
  conf.level = 0.95,
  sides = c("two.sided", "left", "right"),
  ...
)

Arguments

object

the model object as returned by glm.

scaled

logical, defining if scaled or not. Default is FALSE.

conf.level

confidence level of the interval.

sides

a character string specifying the side of the confidence interval, must be one of "two.sided" (default), "left" or "right". "left" would be analogue to a hypothesis of "greater" in a t.test. You can specify just the initial letter.

...

further arguments are passed to the boot function. Supported arguments are type ("norm", "basic", "stud", "perc", "bca"), parallel and the number of bootstrap replicates R. If not defined those will be set to their defaults, being "basic" for type, option "boot.parallel" (and if that is not set, "no") for parallel and 999 for R.

Value

a numeric vector with 3 elements:

mean

mean

lwr.ci

lower bound of the confidence interval

upr.ci

upper bound of the confidence interval

See also

Author

Andri Signorell andri@signorell.net

Examples


utils::data(Pima.te, package = "MASS")
r.logit <- glm(type ~ ., data=Pima.te, family="binomial")

# calculate Brier score with confidence intervals
BrierScore(r.logit)
#> [1] 0.1373809
BrierScoreCI(r.logit, R=99)   # use higher R in real life!
#>       est    lwr.ci    upr.ci 
#> 0.1373809 0.1054405 0.1581186