pit {countreg}R Documentation

Probability Integral Transform (PIT)

Description

Generic function and methods for computing probability integral transform (PIT) from fitted model objects.

Usage

pit(object, ...)

Arguments

object

a fitted model object.

...

further parameters passed to methods.

Details

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.

Value

A vector or matrix of probabilities.

See Also

qresiduals, qqrplot

Examples

## 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,]

[Package countreg version 0.2-1 Index]