Learn R Programming

scoringfunctions (version 1.2)

bregman2_rs: Realised Bregman score (type 2, Patton score)

Description

The function bregman2_rs computes the realised Bregman score (type 2, Patton score) with parameter \(b\), when \(\textbf{\textit{y}}\) materialises and \(\textbf{\textit{x}}\) is the prediction.

Realised Bregman score (type 2) is a realised score corresponding to the Bregman scoring function (type 2, Patton scoring function) bregman2_sf.

Usage

bregman2_rs(x, y, b)

Value

Value of the realised Bregman score (type 2).

Arguments

x

Prediction. It can be a vector of length \(n\) (must have the same length as \(\textbf{\textit{y}}\)).

y

Realisation (true value) of process. It can be a vector of length \(n\) (must have the same length as \(\textbf{\textit{x}}\)).

b

It can be a scalar.

Details

The realised Bregman score (type 2) is defined by:

$$S(\textbf{\textit{x}}, \textbf{\textit{y}}, b) := (1/n) \sum_{i = 1}^{n} L(x_i, y_i, b)$$

where

$$\textbf{\textit{x}} = (x_1, ..., x_n)^\mathsf{T}$$

$$\textbf{\textit{y}} = (y_1, ..., y_n)^\mathsf{T}$$

and

$$ L(x, y, b) := \dfrac{1}{b (b - 1)} (y^b - x^b) - \dfrac{1}{b - 1} x^{b - 1} (y - x) $$

Domain of function:

$$\textbf{\textit{x}} > \textbf{0}$$

$$\textbf{\textit{y}} > \textbf{0}$$

$$b \in \mathbb{R} \setminus \lbrace 0, 1 \rbrace$$

where

$$\textbf{0} = (0, ..., 0)^\mathsf{T}$$

is the zero vector of length \(n\) and the symbol \(>\) indicates pairwise inequality.

Range of function:

$$S(\textbf{\textit{x}}, \textbf{\textit{y}}, b) \geq 0, \forall \textbf{\textit{x}}, \textbf{\textit{y}} > \textbf{0}, b \in \mathbb{R} \setminus \lbrace 0, 1 \rbrace$$

References

Fissler T, Ziegel JF (2019) Order-sensitivity and equivariance of scoring functions. Electronic Journal of Statistics 13(1):1166--1211. tools:::Rd_expr_doi("10.1214/19-EJS1552").

Gneiting T (2011) Making and evaluating point forecasts. Journal of the American Statistical Association 106(494):746--762. tools:::Rd_expr_doi("10.1198/jasa.2011.r10138").

See Also

bregman2_sf, mean_if

Examples

Run this code
# Compute the realised Bregman score (type 2).

set.seed(12345)

b <- 3

x <- 0.5

y <- rlnorm(n = 100, meanlog = 0, sdlog = 1)

print(bregman2_rs(x = x, y = y, b = b))

print(bregman2_rs(x = rep(x = x, times = 100), y = y, b = b))

Run the code above in your browser using DataLab