huberquantile_if: Huber quantile identification function

View source: R/huberquantile_if.R

huberquantile_ifR Documentation

Huber quantile identification function

Description

The function huberquantile_if computes the Huber quantile identification function at a specific level p and parameters a and b, when y materialises and x is the predictive Huber functional at level p.

The Huber quantile identification function is defined by eq. (3.5) in Taggart (2022).

Usage

huberquantile_if(x, y, p, a, b)

Arguments

x

Predictive Huber functional (prediction) at level p. It can be a vector of length n (must have the same length as y).

y

Realisation (true value) of process. It can be a vector of length n (must have the same length as x).

p

It can be a vector of length n (must have the same length as y).

a

It can be a vector of length n (must have the same length as y).

b

It can be a vector of length n (must have the same length as y).

Details

The Huber quantile identification function is defined by:

V(x, y, a) := |\textbf{1} \lbrace x \geq y \rbrace - p| \kappa_{a,b}(x - y)

where \kappa_{a,b}(t) is the capping function defined by:

\kappa_{a,b}(t) := \max \lbrace \min \lbrace t,b \rbrace, -a \rbrace

Domain of function:

x \in \mathbb{R}

y \in \mathbb{R}

0 < p < 1

a > 0

b > 0

Value

Vector of values of the Huber quantile identification function.

Note

For the definition of Huber quantile, see Taggart (2022).

The Huber quantile identification function is a strict \mathbb{F}-identification function for the Huber quantile functional (Taggart 2022).

\mathbb{F} is the family of probability distributions F for which for which \textnormal{E}_F[Y] exists and is finite (Taggart 2022).

References

Taggart RJ (2022) Point forecasting and forecast evaluation with generalized Huber loss. Electronic Journal of Statistics 16:201–231. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/21-EJS1957")}.

Examples

# Compute the Huber quantile identification function.

set.seed(12345)

n <- 10

df <- data.frame(
    x = runif(n, -2, 2),
    y = runif(n, -2, 2),
    p = runif(n, 0, 1),
    a = runif(n, 0, 1),
    b = runif(n, 0, 1)
)

df$huberquantile_if <- huberquantile_if(x = df$x, y = df$y, p = df$p, a = df$a,
    b = df$b)

print(df)

scoringfunctions documentation built on April 4, 2025, 12:28 a.m.