Skip to contents

Wrapper around the dss_sample() function from the scoringRules package.

Usage

dss_sample(true_values, predictions)

Arguments

true_values

A vector with the true observed values of size n

predictions

nxN matrix of predictive samples, n (number of rows) being the number of data points and N (number of columns) the number of Monte Carlo samples. Alternatively, predictions can just be a vector of size n.

Value

vector with scoring values

References

Alexander Jordan, Fabian Krüger, Sebastian Lerch, Evaluating Probabilistic Forecasts with scoringRules, https://www.jstatsoft.org/article/view/v090i12

Examples

true_values <- rpois(30, lambda = 1:30)
predictions <- replicate(200, rpois(n = 30, lambda = 1:30))
dss_sample(true_values, predictions)
#>  [1] 0.0582747 1.1787242 2.2429780 3.3437920 1.9910756 1.9537512 2.3908948
#>  [8] 2.1200172 2.7671578 3.1640183 2.9317905 5.5179625 2.9630454 2.7860884
#> [15] 2.8054793 5.0649780 4.0644916 5.3577338 3.1441762 4.6723837 3.4501010
#> [22] 3.2726421 7.2073024 7.4930602 6.8604853 4.0227221 5.1054834 3.4984804
#> [29] 3.3087245 3.6201119