dss | R Documentation |
This function calculates the Dawid-Sebastiani Score (DSS) given observations of an univariate variable and samples or parameters of a predictive distribution.
dss(y, x, mu = NULL, na.action = na.omit, aggregate = FALSE, ...)
y |
vector of observations |
x |
matrix of samples of a predictive distribution or vector of variances of a predictive distribution (depending on |
mu |
if |
na.action |
function to handle the NA's. Default: |
aggregate |
logical or function for aggregating the single scores, e.g. |
... |
further arguments passed to the |
For a vector y
of length n, x
can be given as matrix of samples of a predictive distribution
with n rows, where the i-th entry of y
belongs to the i-th row
of x
. The columns of x
represent the samples of a predictive distribution.
Consequently mu
must be NULL
. The row-wise
means and variances are determined by its sample versions.
If the variances and means of a predictive distribution are directly
available, x
can be given as vector of variances and mu
can be given as vector of means, where
the i-th entry of y
belongs to the i-th entry of x
and mu
.
A lower DSS indicates a better forecast.
Vector of score value(s).
David Jobst
Dawid, A. and Sebastiani, P. (1999). Coherent dispersion criteria for optimal experimental design. Annals of Statistics, 27, 65-81.
# simulated data
n <- 30
m <- 50
y <- rnorm(n)
x1 <- matrix(rnorm(n*m), ncol = m)
x2 <- rep(1, n)
mu <- rep(0, n)
# dss calculation
dss(y = y, x = x1, mu = NULL)
dss(y = y, x = x1, mu = NULL, aggregate = mean)
dss(y = y, x = x2, mu = mu)
dss(y = y, x = x2, mu = mu, aggregate = mean)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.