gbm (version 0.6)

calibrate.plot: Calibration plot

Description

An experimental diagnostic tool that plots the fitted values versus the actual average values. Currently developed for only distribution="bernoulli".

Usage

calibrate.plot(y, p, ...)

Arguments

y
the outcome 0-1 variable
p
the estimated probabilities
...
other graphics parameters passed on to the plot function

Value

  • calibrate.plot returns no values.

Details

Uses loess to estimate E(y|p). Well-calibrated probabilities imply that E(y|p) = p. The plot also includes a pointwise 95band.

References

J.F. Yates (1982). "External correspondence: decomposition of the mean probability score," Organisational Behaviour and Human Performance 30:132-156. D.J. Spiegelhalter (1986). "Probabilistic Prediction in Patient Management and Clinical Trials," Statistics in Medicine 5:421-433.

Examples

Run this code
library(rpart)
data(kyphosis)
y <- as.numeric(kyphosis$Kyphosis)-1
x <- kyphosis$Age
glm1 <- glm(y~poly(x,2),family=binomial)
p <- predict(glm1,type="response")
calibrate.plot(y, p, xlim=c(0,0.6), ylim=c(0,0.6))

Run the code above in your browser using DataCamp Workspace