calc_relative_horizon: Calculate the effective horizon of a forecast relative to the...

View source: R/date_management.R

calc_relative_horizonR Documentation

Calculate the effective horizon of a forecast relative to the forecast_week_end_date

Description

Calculate the effective horizon of a forecast relative to the forecast_week_end_date

Usage

calc_relative_horizon(forecast_week_end_date, target_end_date, target)

Arguments

forecast_week_end_date

date or vector of dates of the same length as target_end_date, relative to which horizons should be calculated

target_end_date

vector of dates defining dates targeted by forecasts, of same length as target

target

vector of strings specifying targets, e.g. "1 wk ahead inc case", of same length as target_end_date

Value

vector of horizons of forecasts relative to the forecast_week_end_date, in units appropriate to the target scale (wk or day)


reichlab/covidEnsembles documentation built on Jan. 31, 2024, 7:21 p.m.