dot-check_shock_consistency: Check shocks for length consistency and warn about risks of...

Description Usage Arguments Details Author(s)

Description

This function executes two checks and issues one warning.

Usage

1
.check_shock_consistency(shock, periods = periods)

Arguments

shock

A sfcr_shock object

Details

First, it checks that the start of the shock is not negative and that the end of the shock is not bigger than the number of periods in the scenario.

Secondly, it checks for consistency on the length of the shocks added to the scenario. Only two types of exogenous variables are allowed:

  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.

Author(s)

João Macalós


sfcr documentation built on Oct. 11, 2021, 9:09 a.m.