P = swap(P,ExogList,EndogList,Dates)
P = swap(P,ExogList,EndogList,Dates,Sigma)
P
[ plan ] - Simulation plan.
ExogList
[ cellstr | char ] - List of variables that will be exogenized.
EndogList
[ cellstr | char ] - List of shocks that will be endogenized.
Dates
[ numeric ] - Dates at which the variables and shocks will be exogenized/endogenized.
Sigma
[ numeric ] - Anticipation mode (real or imaginary) for the endogenized shocks, and their numerical weight (used in underdetermined simulation plans); if omitted, Sigma = 1
.
P
[ plan ] - Simulation plan with new information on exogenized variables and endogenized shocks included.The function swap
is equivalent to the following separate calls to functions exogenize
and endogenize
:
p = exogenize(p,ExogList,Dates);
p = endogenize(p,EndogList,Dates);
or
p = exogenize(p,ExogList,Dates);
p = endogenize(p,EndogList,Dates,Sigma);
if the input argument Sigma
is provided.