nmoment_if: n-th moment identification function

View source: R/nmoment_if.R

nmoment_ifR Documentation

n-th moment identification function

Description

The function nmoment_if computes the n-th moment identification function, when y materialises and x is the predictive n-th moment.

The expectile identification function is defined in Table 9 in Gneiting (2011) by setting r(t) = t^n and s(t) = 1.

Usage

nmoment_if(x, y, n)

Arguments

x

Predictive n-th moment. It can be a vector of length m (must have the same length as y).

y

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

n

n) is the moment order. It can be a vector of length m (must have the same length as x).

Details

The n-th moment identification function is defined by:

V(x, y, n) := x - y^n

Domain of function:

x \in \mathbb{R}

y \in \mathbb{R}

n \in \mathbb{N}

Value

Vector of values of the n-th moment identification function.

Note

The n-th moment functional is the expectation \textnormal{E}_F[Y^n] of the probability distribution F of y.

The n-th moment identification function is a strict \mathbb{F}-identification function for the n-th moment functional (Gneiting 2011; Fissler and Ziegel 2016).

\mathbb{F} is the family of probability distributions F for which \textnormal{E}_F[Y^n] exists and is finite (Gneiting 2011; Fissler and Ziegel 2016).

References

Fissler T, Ziegel JF (2016) Higher order elicitability and Osband's principle. The Annals of Statistics 44(4):1680–1707. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/16-AOS1439")}.

Gneiting T (2011) Making and evaluating point forecasts. Journal of the American Statistical Association 106(494):746–762. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1198/jasa.2011.r10138")}.

Examples

# Compute the n-th moment scoring function.

df <- data.frame(
    y = rep(x = 2, times = 6),
    x = c(1, 2, 3, 1, 2, 3),
    n = c(2, 2, 2, 3, 3, 3)
)

df$nmoment_if <- nmoment_if(x = df$x, y = df$y, n = df$n)

print(df)

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