Learn R Programming

scoringfunctions (version 1.1)

serrexp_sf: Squared error exp scoring function

Description

The function serrexp_sf computes the squared error exp scoring function when \(y\) materialises and \(x\) is the \((1/a) \log(\textnormal{E}_F[\exp(aY)])\) predictive entropic risk measure (Gerber 1974).

The squared error exp scoring function is defined in Fissler and Pesenti (2023).

Usage

serrexp_sf(x, y, a)

Value

Vector of squared errors of exp-transformed variables.

Arguments

x

Predictive \((1/a) \log(\textnormal{E}_F[\exp(aY)])\) 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 squared error exp scoring function is defined by:

$$S(x, y) := (\exp(ax) - \exp(ay))^2$$

Domain of function:

$$x \in \mathbb{R}$$

$$y \in \mathbb{R}$$

$$a \neq 0$$

Range of function:

$$S(x, y) \geq 0, \forall x, y \in \mathbb{R}, a \neq 0$$

References

Fissler T, Pesenti SM (2023) Sensitivity measures based on scoring functions. European Journal of Operational Research 307(3):1408--1423. tools:::Rd_expr_doi("10.1016/j.ejor.2022.10.002").

Gerber HU (1974) On additive premium calculation principles. ASTIN Bulletin: The Journal of the IAA 7(3):215--222. tools:::Rd_expr_doi("10.1017/S0515036100006061").

Tyralis H, Papacharalampous G (2025) Transformations of predictions and realizations in consistent scoring functions. tools:::Rd_expr_doi("10.48550/arXiv.2502.16542").

Examples

Run this code
# Compute the squarer error exp scoring function.

df <- data.frame(
    y = rep(x = 0, times = 5),
    x = -2:2,
    a = c(-2, -1, 1, 2, 3)
)

df$squaredexp_error <- serrexp_sf(x = df$x, y = df$y, a = df$a)

print(df)

Run the code above in your browser using DataLab