Description Usage Arguments Value Author(s) References See Also Examples
Proper scoring rules for Poisson or negative binomial predictions
of count data are described in Czado et al. (2009).
The following scores are implemented:
logarithmic score (logs
),
ranked probability score (rps
),
DawidSebastiani score (dss
),
squared error score (ses
).
1 2 3 4 5 6 7 8 9 10 11 
x 
the observed counts. All functions are vectorized and also accept matrices or arrays. Dimensions are preserved. 
mu 
the means of the predictive distributions for the
observations 
size 
either 
which 
a character vector specifying which scoring rules to apply.
By default, all four proper scores are calculated.
The normalized squared error score ( 
sign 
a logical indicating if the function should also return

... 
unused (argument of the generic). 
k 
scalar argument controlling the finite sum approximation for the

tolerance 
absolute tolerance for the finite sum approximation employed in the

The scoring functions return the individual scores for the predictions
of the observations in x
(maintaining their dimension attributes).
The default scores
method applies the selected (which
)
scoring functions (and calculates sign(xmu)
) and returns the
results in an array (via simplify2array
), where the last
dimension corresponds to the different scores.
Sebastian Meyer and Michaela Paul
Czado, C., Gneiting, T. and Held, L. (2009): Predictive model assessment for count data. Biometrics, 65 (4), 12541261. doi: 10.1111/j.15410420.2009.01191.x
The R package scoringRules implements the logarithmic score and the (continuous) ranked probability score for many distributions.
1 2 3 4 5 6 7 8 9 10 11  mu < c(0.1, 1, 3, 6, pi, 100)
size < 0.1
set.seed(1)
y < rnbinom(length(mu), mu = mu, size = size)
scores(y, mu = mu, size = size)
scores(y, mu = mu, size = 1) # ses ignores the variance
scores(y, mu = 1, size = size)
## apply a specific scoring rule
scores(y, mu = mu, size = size, which = "rps")
rps(y, mu = mu, size = size)

Loading required package: sp
Loading required package: xtable
Loading required package: polyCub
This is surveillance 1.14.0. For overview type 'help(surveillance)'.
logs rps dss ses
[1,] 0.06931472 0.004964256 1.559438 0.010000
[2,] 5.33286895 7.531930222 8.216077 64.000000
[3,] 0.34339872 0.327742345 4.629374 9.000000
[4,] 4.90597889 6.601820669 5.946349 16.000000
[5,] 0.34786499 0.344097506 4.720295 9.869604
[6,] 0.69087548 11.651369846 11.613825 10000.000000
logs rps dss ses
[1,] 0.09531018 0.008333333 2.116366 0.010000
[2,] 6.93147181 7.337239583 32.693147 64.000000
[3,] 1.38629436 1.285714286 3.234907 9.000000
[4,] 3.48741695 3.337930556 4.118622 16.000000
[5,] 1.42108041 1.355121967 3.324357 9.869604
[6,] 4.61512052 49.751243781 10.210390 10000.000000
logs rps dss ses
[1,] 0.2397895 0.09897212 2.488804 1
[2,] 5.3328690 7.53193022 8.216077 64
[3,] 0.2397895 0.09897212 2.488804 1
[4,] 5.5224898 8.47616310 9.761532 81
[5,] 0.2397895 0.09897212 2.488804 1
[6,] 0.2397895 0.09897212 2.488804 1
rps
[1,] 0.004964256
[2,] 7.531930222
[3,] 0.327742345
[4,] 6.601820669
[5,] 0.344097506
[6,] 11.651369846
[1] 0.004964256 7.531930222 0.327742345 6.601820669 0.344097506
[6] 11.651369846
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.