Compute RPS for a single forecast

compute_RPS(forecast, outcome)

Arguments

forecast

Vector of length N (forecast).

outcome

Index of the true outcome (between 1 and N).

Value

RPS (numeric scalar)

Examples

compute_RPS(c(.2, .5, .3), 2)
#> [1] 0.065