ds | R Documentation |
This function calculates the Determinant Sharpness (DS) given covariance matrices of a predictive distribution.
ds(x, covmat = FALSE, na.action = na.omit, aggregate = FALSE, ...)
x |
3-dimensional array of samples or covariance matrices of a predictive distribution (see details) |
covmat |
logical; 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 |
Each third dimension entry of the array x
must contain a (symmetric) covariance matrix or samples of a multivariate predictive distribution.
This covariance matrices are either analytically available or must are estimated by e.g. the sample covariance matrix.
A lower DS indicates a sharper forecast.
Vector of the score value(s).
David Jobst
Gneiting, T., Stanberry, L., Grimit, E., Held, L. and Johnson, N. (2008). Assessing probabilistic forecasts of multivariate quantities, with an application to ensemble predictions of surface winds. Test, 17, 211-264.
# simulated data
n <- 30
m <- 50
x <- array(NA, dim = c(2, 2, n))
for (i in 1:n) {
x[, , i] <- cov(cbind(rnorm(m), rgamma(m, shape = 1)))
}
z <- array(rnorm(10000*5*365), dim = c(10000, 5, 365))
# ds calculation with provided covariance matrix
ds(x = x, covmat = TRUE)
ds(x = x, covmat = TRUE, aggregate = mean)
# ds calculation without provided covariance matrix
ds(x = z, covmat = FALSE)
ds(x = z, covmat = FALSE, aggregate = mean)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.