IRIS Toolbox Reference Manual

## dbminuscontrol

Create simulation-minus-control database

#### Syntax

    [D,C] = dbminuscontrol(M,D)
    [D,C] = dbminuscontrol(M,D,C)

#### Input arguments

- `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.

#### Output arguments

- `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.

#### Description

#### Example

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);

IRIS Toolbox. Copyright © 2007—2013 Jaromir Benes.