pit_hist: Compute PIT Histogram

Description Usage Arguments Value Examples

View source: R/diagnostics.R

Description

PIT= Probability integral transform, also called Rank Histogram

Usage

1
pit_hist(hx, y, fig = TRUE, ...)

Arguments

hx

ensemble prediction (dxK :one row for each y, one col for each ensemble member)

y

actual vector of observations

fig

should the histogram be plotted or the ranks be returned?

Value

the vector of ranks (length of y)

Examples

1
2
3
4
5
6
7
set.seed(1)
d <- 1000
yo <- rnorm(d)
k <- 40
pit <- pit_hist(matrix(rnorm(d*k, 0, 1  ), d, k), yo, main='calibrated ensemble')
pit <- pit_hist(matrix(rnorm(d*k, 0, 0.5), d, k), yo, main='underdispersed')
pit <- pit_hist(matrix(rnorm(d*k, 0, 1.5), d, k), yo, main='overdispersed')

robertsy/assimilr documentation built on May 27, 2019, 10:33 a.m.