posterior_metrics {epidemia}R Documentation

CRPS, Mean Absolute Error, Median Absolute Error

Description

Calculate daily error using one of three metrics, and also return coverage of credible intervals. Uses continuous ranked probability score (CRPS), mean absolute error and median absolute error.

Usage

posterior_metrics(object, type, newdata = NULL, groups = NULL, metrics = NULL)

Arguments

object

A fitted model object returned by epim. See epimodel-objects.

type

A string specifying the name of the observations to plot. This should match one of the names of the response variables in the obs argument used int the call to epim.

newdata

If provided, the original data used in object is overridden. Useful for forecasting

groups

Either NULL or a character vector specifying the groups to plot for. Default is NULL, which plots all modeled groups.

metrics

A string or character vector specifying the plotted forecast error metrics. One of NULL, "crps", "mean_abs_error"

Value

A dataframe giving forecast error for each metric and observation


[Package epidemia version 1.0.0 Index]