pithist {topmodels} | R Documentation |
PIT histograms graphically compare empirical probabilities from fitted models with a uniform distribution.
pithist(object, ...) ## Default S3 method: pithist(object, newdata = NULL, type = c("random", "proportional"), nsim = 1L, breaks = NULL, xlim = c(0, 1), ylim = NULL, xlab = "PIT", ylab = "Density", main = NULL, border = "black", fill = "lightgray", col = "#B61A51", lwd = 2, lty = 1, freq = FALSE, ...)
object |
an object from which probability integral transforms can be
extracted with |
newdata |
optionally, a data frame in which to look for variables with which to predict. If omitted, the original observations are used. |
type |
character. In case of discrete distributions should the PITs be drawn randomly from the corresponding interval or distributed proportionally? |
nsim |
integer. If |
breaks |
numeric. Breaks for the histogram intervals. |
xlab, ylab, main |
graphical parameters. |
xlim, ylim, border, fill, col, lwd, lty |
graphical parameters. These may pertain either to the whole plot or just the histogram or just the fitted line. |
freq, ... |
further arguments passed to
|
PIT histograms graphically the probability integral transform (PIT),
i.e., observed probabilities from fitted probability models, with
a uniform distribution. It leverages the procast
generic
and then essentially draws a hist
.
In case of discrete distributions the PIT is either drawn randomly from the corresponding interval or distributed proportionally in the histogram (FIXME: not yet implemented).
Czado C, Gneiting T, Held L (2009). “Predictive Model Assessment for Count Data.” Biometrics, 65(4), 1254–1261.
## linear regression models (homoscedastic Gaussian response) m <- lm(dist ~ speed, data = cars) plot(m)