logscore {scoring} | R Documentation |
Calculate logarithmic scores and average logarithmic scores by a grouping variable.
logscore(object, data, group = NULL, reverse = FALSE)
object |
an object of class "formula", of the form
|
data |
an optional data frame or list containing the
variables in the formula. If not found in |
group |
the name of a grouping variable within |
reverse |
if |
If group
is supplied, the function returns
a list (see value section). Otherwise, the function returns a numeric
vector containing the log score associated with each forecast.
The argument bounds
is not available because
the upper bound of the logarithmic score is infinity. If one wants a
bounded rule that approximates the logarithmic rule, try using
calcscore()
with fam="pow"
and param=1.001
.
Depending on input arguments, logscore
may return an object of
class numeric
containing raw logarithmic scores. It may also return
a list containing the objects below.
rawscores |
an object of class |
mnlog |
an object of class |
Ed Merkle
Toda, M. (1963). Measurement of subjective probability distributions. ESD-TDR-63-407, Decision Sciences Laboratory, L. G. Hanscom Field, Bedford, Mass.
Shuford, E. H., Albert, A., & Massengill, H. E. (1966). Admissible probability measurement procedures. Psychometrika, 31, 125-145.
data("WorldEvents") ## Raw log scores (0 best, infinity worst) log1 <- logscore(answer ~ forecast, data=WorldEvents) ## Raw log scores (0 best, -infinity worst) log1 <- logscore(answer ~ forecast, data=WorldEvents, reverse = TRUE) ## Raw log scores plus group means log2 <- logscore(answer ~ forecast, data=WorldEvents, group="forecaster")