The function logs_nbmix computes the logarithmic score of forecasts based on mixtures of negative binomial (or Poisson) distributions via dnbmix(). This is different from the kernel density estimation approach available via scores_sample().

logs_nbmix(observed, means, size)

Arguments

observed

a vector of observed counts during the simulation period.

means

a n.ahead x n.sim matrix of means.

size

the dispersion parameter of the dnbinom() distribution or NULL (Poisson forecasts). Can also be time-varying (of length n.ahead).

Value

a vector of log-scores for the observed counts.

See also

scores_sample() for an alternative approach of calculating the logarithmic score from simulation-based forecasts

Author

Sebastian Meyer