calc_val_stats: Calculate validation statistics from forecast results.

Description Usage Arguments Value

View source: R/model_validation.R

Description

Helper function to calculate the validation statistics from each model run. Mean Absolute Error (MAE), Root Mean Square Error (RMSE), Proportion of observations in in prediction interval, and R^2. Calculates it both at a global model level per timestep ahead, and at a geographical grouping level per timestep ahead. Also calculates a timeseries of evaluation metrics at every per_timesteps number of timesteps per grouping (if applicable) and timestep_ahead.

Usage

1
calc_val_stats(fc_trim, quo_groupfield, per_timesteps, dots)

Arguments

fc_trim

The forecast results of one model type, combined with observed values, trimmed to user requested date range.

quo_groupfield

Quosure of the user given geographic grouping field to run_validation()/run_epidemia().

per_timesteps

When creating a timeseries of validation results, create a moving window with per_timesteps width number of time points. Should be a minimum of 10 timesteps.

dots

The non-required arguments to run_validation() for developer testing.

Value

A named list of validation statistic results: validation_overall, validation_grouping, validation_timeseries, validation_perweek


EcoGRAPH/epidemiar documentation built on Nov. 13, 2020, 5:31 p.m.