The function logs_hhh4sims computes the logarithmic score of the forecast distributions based on a surveillance::hhh4() model and simulations (sims) thereof. The forecast distributions are obtained via dhhh4sims() as sequential mixtures of negative binomial (or Poisson) distributions, which is different from the kernel density estimation approach employed in scores_sample().

logs_hhh4sims(observed = NULL, sims, model)

Arguments

observed

a vector or matrix of observed counts during the simulation period. By default (NULL), this is taken from attr(sims, "stsObserved").

sims

a "hhh4sims" object from surveillance::simulate.hhh4().

model

the surveillance::hhh4() fit underlying sims.

Value

a vector or matrix 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