Skip to content

swap (Plan)

Exogenize variables and endogenize shocks

Syntax

p = swap(p, datesToSwap, pairToSwap, pairToSwap, ...)

Input arguments

p [ Plan ]

Simulation plan to which the new swapped pairs will be added.

datesToSwap [ DateWrapper ]

Dates at which the endogeneity and exogeneity of the variable-shock pairs will be swapped.

pairToSwap [ string ]

String array consisting of the name of a variables (transition or measurement) and the name of a shock (transition or measurement) whose endogeneity and exogeneity will be swapped in the simulation at specified dates, datesToSwap. Any number of pairs can be specified as input arguments to the swap(~) function.

Output arguments

p [ Plan ]

Simulation plan with the new swap information included.

Description

The simulation plan only specifies the dates and the names of variables and shocks; it does not include the particular values to which the variables will be exogenized. These values need to be included in the input databank entering the Model/simulate function.

Example