powerweighted_if: Power-weighted identification function

View source: R/powerweighted_if.R

powerweighted_ifR Documentation

Power-weighted identification function

Description

The function powerweighted_if computes the power-weighted identification function with parameter a, when y materialises and \dfrac{\textnormal{E}_F [Y^{a + 1}]}{\textnormal{E}_F [Y^a]} is the predictive functional.

The power-weighted identification function is defined by Table 9 in Gneiting (2011), applied to r(y) = y^{a + 1} and s(y) = y^a.

Usage

powerweighted_if(x, y, a)

Arguments

x

Predictive \dfrac{\textnormal{E}_F [Y^{a + 1}]}{\textnormal{E}_F [Y^a]} functional (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 power-weighted identification function is defined by:

V(x, y, a) := x y^a - y^{a + 1}

or equivalently,

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

Domain of function:

x > 0

y > 0

a \in \mathbb{R}

Range of function:

V(x, y, a) \in \mathbb{R}

Value

Vector of values of the power-weighted identification function.

Note

The \dfrac{\textnormal{E}_F [Y^{a + 1}]}{\textnormal{E}_F [Y^a]} functional is the ratio of expectations formed by weighting the probability distribution F of Y with w(y) = y^a (eq. (11) in Gneiting 2011). For details on this functional, see powerweighted_sf.

The power-weighted identification function is a strict \mathbb{F}-identification function for the \dfrac{\textnormal{E}_F [Y^{a + 1}]}{\textnormal{E}_F [Y^a]} functional (Table 9 and Theorem 8 in Gneiting 2011). \mathbb{F} is the family of probability distributions F for which \textnormal{E}_F[Y^a] and \textnormal{E}_F[Y^{a + 1}] exist and are finite (Theorem 8 in Gneiting 2011).

At a = 0 the power-weighted identification function reduces to mean_if and the functional to the mean \textnormal{E}_F[Y].

This is the identification function counterpart of powerweighted_sf, and thereby also of obsweighted_sf and srelerr_sf at a = 1 and of sperr_sf at a = -2.

References

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")}.

See Also

powerweighted_sf

Examples

# Compute the power-weighted identification function.

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

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

print(df)

# The power-weighted identification function reduces to the mean identification
# function at a = 0.

set.seed(12345)

n <- 10

x <- runif(n = n, min = 0, max = 2)
y <- runif(n = n, min = 0, max = 2)

max(abs(powerweighted_if(x = x, y = y, a = 0) - mean_if(x = x, y = y)))

# values are slightly higher than 0 due to rounding error

scoringfunctions documentation built on Aug. 30, 2026, 5:07 p.m.