Learn R Programming

sfcr (version 0.2.1)

.check_external_consistency: Check shocks for length consistency and warn about risks of using exogenous series

Description

This function makes two checks:

Usage

.check_external_consistency(external, periods = periods)

Arguments

external

An .eq_as_tb() tibble with external variables.

periods

The periods of the baseline model.

Details

  1. The exogenous variable is a constant that is repeated over time;

  2. The exogenous variable has exactly the same length as the shock.

Furthermore, it throws a warning that using exogenous series in a shock can lead to unexpected behavior if the length of the shock is not the same as the periods in the scenario.