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), in its general form.

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, p, a, b) := |\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

Range of function:

-p a \leq V(x, y, p, a, b) \leq (1 - p) b, \forall x, y \in \mathbb{R}, p \in (0, 1), a, b > 0

Value

Vector of values of the Huber quantile identification function.

Note

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

At p = 1/2 and b = a the Huber quantile identification function reduces to the Huber mean identification function hubermean_if.

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 \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(1):201–231. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/21-EJS1957")}.

See Also

ghuber_sf, ghuber_rs

Examples

# Compute the Huber quantile identification function.

set.seed(12345)

n <- 10

df <- data.frame(
    x = runif(n = n, min = -2, max = 2),
    y = runif(n = n, min = -2, max = 2),
    p = runif(n = n, min = 0, max = 1),
    a = runif(n = n, min = 0, max = 1),
    b = runif(n = n, min = 0, max = 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 Aug. 30, 2026, 5:07 p.m.