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

Arguments

x

a vector of observed counts.

sims

a matrix of simulated counts with as many rows as length(x).

which

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.

Value

scores for the predictions of the observations in x (maintaining their dimensions).