Description Usage Arguments Details Value Author(s) References Examples
View source: R/calibrate.plot.R
An experimental diagnostic tool that plots the fitted values versus the actual average values.
Currently developed for only distribution="bernoulli".
| 1 2 3 4 5 6 7 8 9 10 11 12 | 
| y | the outcome 0-1 variable | 
| p | the predictions estimating E(y|x) | 
| distribution | the loss function used in creating  | 
| replace |  determines whether this plot will replace or overlay the current plot.
 | 
| line.par | graphics parameters for the line | 
| shade.col |  color for shading the 2 SE region.  | 
| shade.density |  the  | 
| rug.par | graphics parameters passed to  | 
| xlab | x-axis label corresponding to the predicted values | 
| ylab | y-axis label corresponding to the observed average | 
| xlim,ylim | x and y-axis limits. If not specified the function will select limits | 
| knots,df | these parameters are passed directly to 
 | 
| ... | other graphics parameters passed on to the plot function | 
Uses natural splines to estimate E(y|p). Well-calibrated predictions imply that E(y|p) = p. The plot also includes a pointwise 95 band.
calibrate.plot returns no values.
Greg Ridgeway gregridgeway@gmail.com
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.
| 1 2 3 4 5 6 7 8 9 | # Don't want R CMD check to think there is a dependency on rpart
# so comment out the example
#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))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.