Winkler score for probabilistic forecasts

winkler_score(actual, lower, upper, level = 95, scale = FALSE)

Arguments

actual

numeric vector of actual values

lower

numeric vector of lower bounds

upper

numeric vector of upper bounds

level

numeric level of confidence

scale

logical, if TRUE, the score is scaled by the range of the bounds

Value

numeric score

Examples


actual <- c(1, 2, 3, 4, 5)
lower <- c(0, 1, 2, 3, 4)
upper <- c(2, 3, 4, 5, 6)
winkler_score(actual, lower, upper)
#> [1] 2
winkler_score(actual, lower, upper, scale = TRUE)
#> [1] 0
winkler_score(actual, lower, upper, level = 99)
#> [1] 2
winkler_score(actual, lower, upper, level = 99, scale = TRUE)
#> [1] 0