Skip to contents

VaR(dist, p) is the inverted empirical distribution function; TVaR(dist, p) is the mean of the worst 1 - p, splitting the draw at the VaR so it is coherent and continuous in p. For a predictive_distribution both describe the total over all components.

Usage

VaR(dist, p, ...)

TVaR(dist, p, ...)

Arguments

dist

A sampled, predictive_distribution or pot_tail.

p

Probabilities in [0, 1].

...

Unused; for methods.

Value

Numeric vector the length of p.

Examples

s <- sampled(c(1, 2, 3, 4))
VaR(s, 0.5)
#> [1] 2
TVaR(s, 0.5)
#> [1] 3.5