IRIS Toolbox Reference Manual

## diffloglik

Approximate gradient and hessian of log-likelihood function

#### Syntax

    [MinusLogLik,Grad,Hess,V] = diffloglik(M,D,Range,PList,...)

#### Input arguments

- `M` [ model ] - Model object whose likelihood function will be differentiated.

- `D` [ cell | struct ] - Input data from which measurement variables will be taken.

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

- `List` [ cellstr ] - List of model parameters with respect to which the likelihood function will be differentiated.

#### Output arguments

- `MinusLogLik` [ numeric ] - Value of minus the likelihood function at the input data.

- `Grad` [ numeric ] - Gradient (or score) vector.

- `Hess` [ numeric ] - Hessian (or information) matrix.

- `V` [ numeric ] - Estimated variance scale factor if the `'relative='` options is true; otherwise `v` is 1.

#### Options

- `'chkSstate='` [ `true` | `false` | cell ] - Check steady state in each iteration; works only in non-linear models.

- `'refresh='` [ `true` | `false` ] - Refresh dynamic links for each change in a parameter.

- `'solve='` [ `true` | `false` ] - Re-compute solution for each change in a parameter.

- `'sstate='` [ `true` | `false` | cell ] - Re-compute steady state in each differentiation step; if the model is non-linear, you can pass in a cell array with options used in the `sstate` function.

See help on `model/filter` for other options available.

#### Description

#### Example

IRIS Toolbox. Copyright © 2007—2013 Jaromir Benes.