This is a simple wrapper around functions from the scoringRules
package to calculate scoring rules from simulation-based forecasts.
Calculation of the logarithmic score involves kernel density estimation,
see scoringRules::logs_sample()
.
The function is vectorized and preserves the dimension of the input.
scores_sample(x, sims, which = c("dss", "logs"))
a vector of observed counts.
a matrix of simulated counts with as many rows as length(x)
.
a character vector specifying which scoring rules to apply. The
Dawid-Sebastiani score ("dss"
) and the logarithmic score ("logs"
)
are available and both computed by default.
scores for the predictions of the observations in x
(maintaining
their dimensions).