pit.hist | R Documentation |
This function plots the Probability Integral Transform (PIT) Histogram for a predictive distribution.
pit.hist(
u,
bins = NULL,
type = "density",
title = "PIT Histogram",
dispersion = FALSE,
bias = FALSE,
na.action = na.omit
)
u |
vector of PIT values in [0,1] (see details) |
bins |
numeric; number of bins; default: |
type |
character; " |
title |
character; title of the plot; default: " |
dispersion |
logical; if |
bias |
logical; if |
na.action |
function to handle the NA's. Default: |
The vector u
contains the PIT values u
=F(x
) for a predictive
distribution F evaluated at x
.
The parameter bins
specifies the number of columns for the PIT histogram.
If type
is "relative
" the relative frequencies of the bins are plotted.
If type
is "absolute
" the absolute frequencies of the bins are plotted.
If type
is "density
" the relative densities of the bins are plotted.
An uniform PIT histogram indicates a calibrated predictive distribution. A ∩-shape in the PIT histogram indicates overdispersion and a ∪-shape indicates underdispersion of the predictive distribution. A systematic bias of the predictive distribution results in a triangular shaped PIT histogram.
The variance of the PIT values (Var(PIT)) provides information on the dispersion of a predictive distribution subject to calibration. A variance of the PIT values equal to 1/12 ≈ 0.0833 corresponds to the variance of the uniform distribution on [0,1], which is desirable. A variance greater than 1/12 indicates underdispersion and a variance smaller than 1/12 indicates overdispersion of the predictive distribution.
The expectation value of the PIT values (E(PIT)) provides information on the bias of a predictive distribution subject to calibration. An expectation of the PIT values equal to 1/2 corresponds to the expectation of the uniform distribution on [0,1], which is desirable. Any deviation from 1/2 indicates that the predictive distribution is biased.
ggplot object with a plot of the PIT histogram.
David Jobst
Dawid, A. (1984). Present Position and Potential Developments: Some Personal Views: Statistical Theory: The Prequential Approach. 147(2), 278-292.
Gneiting, T., Balabdaoui, F. and Raftery, A. (2007). Probabilistic forecasts, calibration and sharpness. Journal of the Royal Statistical Society, Series B, Statistical Methodology. 69, 243–268.
Czado, C., Gneiting, T. and Held, L. (2009). Predictive Model Assessment for Count Data. Biometrics, 65(4), 1254–1261.
Gneiting, T. and Ranjan, R. (2013). Combining predictive distributions. Electronic Journal of Statistics, 7, 1747-1782.
# simulated data
n <- 10000
u <- runif(n)
# pit plot
pit.hist(u = u)
pit.hist(u = u, bins = 5, title = "PITH", dispersion = TRUE, bias = FALSE)
pit.hist(u = u, bins = 5, type = "relative", dispersion = FALSE, bias = TRUE)
pit.hist(u = u, bins = 5, type = "absolute", dispersion = TRUE, bias = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.