[D,C] = dbminuscontrol(M,D)
[D,C] = dbminuscontrol(M,D,C)
M
[ model ] - Model object on which the databases D
and C
are based.
D
[ struct ] - Simulation database.
C
[ struct ] - Control database; if the input argument C
is not specified, the steady-state database of the model M
is used for the control database.
D
[ struct ] - Simulation-minus-control database, in which all log variables are d.x/c.x
, and all other variables are d.x-c.x
.
C
[ struct ] - Control database.
We run a shock simulation in full levels using a steady-state (or balanced-growth-path) database as input, and then compute the deviations from the steady state.
d = sstatedb(m,1:40);
... % Set up a shock or shocks here.
s = simulate(m,d,1:40);
s = dbextend(d,s);
s = dbminuscontrol(m,s,d);
Note that this is equivalent to running
d = zerodb(m,1:40);
... % Set up a shock or shocks here.
s = simulate(m,d,1:40,'deviation',true);
s = dbextend(d,s);