hubermean_if: Huber mean identification function

View source: R/hubermean_if.R

hubermean_ifR Documentation

Huber mean identification function

Description

The function hubermean_if computes the Huber mean identification function with parameter a, when y materialises and x is the predictive Huber mean.

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

Usage

hubermean_if(x, y, a)

Arguments

x

Predictive Huber mean (prediction). 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).

a

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

Details

The Huber mean identification function is defined by:

V(x, y, a) := (1/2) \kappa_{a,a}(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}

a > 0

Value

Vector of values of the Huber mean identification function.

Note

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

The Huber mean identification function is a strict \mathbb{F}-identification function for the Huber mean 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 mean identification function.

df <- data.frame(
    x = c(-3, -2, -1, 0, 1, 2, 3),
    y = c(0, 0, 0, 0, 0, 0, 0),
    a = c(2.7, 2.5, 0.6, 0.7, 0.9, 1.2, 5)
)

df$hubermean_if <- hubermean_if(x = df$x, y = df$y, a = df$a)

print(df)

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