IRIS Toolbox Reference Manual

## lhsmrhs

Evaluate the discrepancy between the LHS and RHS for each model equation and given data

#### Syntax for casual evaluation

    Q = lhsmrhs(M,D,Range)

#### Syntax for fast evaluation

    Q = lhsmrhs(M,YXE)

#### Input arguments

`M` [ model ] - Model object whose equations and currently assigned parameters will be evaluated.

`YXE` [ numeric ] - Numeric array created from an input database by calling the function `data4lhsmrhs`; `YXE` contains the observations on the measurement variables, transition variables, and shocks organised row-wise.

- `D` [ struct ] - Input database with observations on measurement variables, transition variables, and shocks on which the discrepancies will be evaluated.

- `Range` [ numeric ] - Date range on which the discrepancies will be evaluated.

#### Output arguments

`Q` [ numeric ] - Numeric array with discrepancies between the LHS and RHS for each model equation.

#### Description

The function `lhsmrhs` evaluates the discrepancy between the LHS and the RHS in each model equation; each lead is replaced with the actual observation supplied in the input data. The function `lhsmrhs` does not work for models with references to steady state values.

The first syntax, with the array `YXE` pre-built in a call to `data4lhsmrhs` is computationally much more efficient if you need to evaluate the LHS-RHS discrepancies repeatedly for different parameterisations.

The output argument `D` is an `nEqtn` by `nPer` by `nAlt` array, where `nEqnt` is the number of measurement and transition equations, `nPer` is the number of periods used to create `X` in a prior call to `data4lhsmrhs`, and `nAlt` is the greater of the number of alternative parameterisations in `M`, and the number of alternative datasets in the input data.

#### Example

    YXE = data4lhsmrhs(M,d,range);
    Q = lhsmrhs(M,YXE);

IRIS Toolbox. Copyright © 2007—2013 Jaromir Benes.