linex_sf: LINEX scoring function

View source: R/linex_sf.R

linex_sfR Documentation

LINEX scoring function

Description

The function linex_sf computes the LINEX scoring function with parameter a when y materialises and x is the predictive -(1/a) \log{\textnormal{E}_F[\textnormal{e}^{-a Y}]} moment generating functional.

The LINEX scoring function is defined by Varian (1975).

Usage

linex_sf(x, y, a)

Arguments

x

Predictive -(1/a) \log{\textnormal{E}_F[\textnormal{e}^{-a Y}]} moment generating 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 LINEX scoring function is defined by:

S(x, y, a) := \textnormal{e}^{a (x - y)} - a (x - y) - 1

Domain of function:

x \in \mathbb{R}

y \in \mathbb{R}

a \neq 0

Range of function:

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

Value

Vector of LINEX losses.

Note

For details on the LINEX scoring function, see Varian (1975) and Zellner (1986).

The LINEX scoring function is negatively oriented (i.e. the smaller, the better).

The LINEX scoring function is strictly \mathbb{F}-consistent for the -(1/a) \log{\textnormal{E}_F[\textnormal{e}^{-a Y}]} moment generating functional. \mathbb{F} is the family of probability distributions F for which \textnormal{E}_F[\textnormal{e}^{-a Y}] and \textnormal{E}_F[Y] exist and are finite (Varian 1975; Zellner 1986; Gneiting 2011).

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

Varian HR (1975) A Bayesian approach to real estate assessment. In: Fienberg SE, Zellner A(eds) Studies in Bayesian Econometrics and Statistics in Honor of Leonard J. Savage. Amsterdam: North-Holland, pp 195–208.

Zellner A (1986) Bayesian estimation and prediction using asymmetric loss functions. Journal of the American Statistical Association 81(394):446–451. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/01621459.1986.10478289")}.

Examples

# Compute the LINEX scoring function.

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

df$linex_loss <- linex_sf(x = df$x, y = df$y, a = df$a)

print(df)

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