logs | R Documentation |
This function calculates the Logarithmic Score (LogS) given density values of observations of an uni- or multivariate predictive distribution.
logs(y, na.action = na.omit, aggregate = FALSE, ...)
y |
vector of density values |
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 predictive density function f the density values y
of observations x
are
obtained by y
= f(x
).
A lower LogS indicates a better forecast.
Vector of score value(s).
David Jobst
Good, I. (1952). Rational decisions. Journal of the Royal Statistical Society Ser. B, 14, 107-114.
# simulated data
n <- 30
x <- sample(-10:35, size = n, replace = TRUE)
y <- dnorm(x = x, mean = 0, sd = 1)
# logs calculation
logs(y = y)
logs(y = y, aggregate = mean)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.