pit {countreg} | R Documentation |
Generic function and methods for computing probability integral transform (PIT) from fitted model objects.
pit(object, ...)
object |
a fitted model object. |
... |
further parameters passed to methods. |
The probability integral transform (PIT) is defined as \hat F(y), i.e., a fitted
or estimated cumulative distribution function \hat F(\cdot) evaluated at
observations y. It is a basic quantity employed for model diagnostics, e.g.,
with quantile residuals (qresiduals
), corresponding Q-Q plots
(qqrplot
), or the PIT histogram (pithist
).
In case of discrete distributions pit
should compute a matrix with two-columns:
the left-handed limit of the PIT and the PIT at the observed response, respectively.
A vector or matrix of probabilities.
## count data regression models: crab satellites data("CrabSatellites", package = "countreg") cs_p <- glm(satellites ~ width + color, data = CrabSatellites, family = poisson) pit(cs_p)[1:5,]