IRIS Toolbox Reference Manual

estimate

Estimate model parameters by optimising selected objective function

Syntax

[PEst,Pos,Cov,Hess,M,V,Delta,PDelta] = estimate(M,D,Range,Est,...)
[PEst,Pos,Cov,Hess,M,V,Delta,PDelta] = estimate(M,D,Range,Est,SPr,...)

Input arguments

Output arguments

The remaining three output arguments, V, Delta, PDelta, are the same as the model/loglik output arguments of the same names.

Options

Options for Particle Swarm Optimizer

The following options can be specified through the main option 'optimset=' when 'optimiser=pso'.

Description

The parameters that are to be estimated are specified in the input parameter estimation database, E in which you can provide the following specifications for each parameter:

E.parameter_name = { start, lower, upper, logpriorFunc };

where start is the value from which the numerical optimization will start, lower is the lower bound, upper is the upper bound, and logpriorFunc is a function handle expected to return the log of the prior density. You can use the logdist package to create function handles for some of the basic prior distributions.

You can use NaN for start if you wish to use the value currently assigned in the model object. You can use -Inf and Inf for the bounds, or leave the bounds empty or not specify them at all. You can leave the prior distribution empty or not specify it at all.

Estimating nonlinear models

By default, only the first-order solution, but not the steady state is updated (recomputed) in each iteration before the likelihood is evaluated. This behavior is controled by two options, 'solve=' (true by default) and 'sstate=' (false by default). If some of the estimated parameters do affect the steady state of the model, the option 'sstate=' needs to be set to true or to a cell array with steady-state options, as in the function sstate, otherwise the results will be groslly inaccurate or a valid first-order solution will be impossible to find.

When steady state is recomputed in each iteration, you may also want to use the option 'chksstate=' to require that a steady-state check for all model equations be performed.

User-supplied optimization (minimization) routine

You can supply a function handle to your own minimization routine through the option 'optimiser='. This routine will be used instead of the Optim Tbx's fminunc or fmincon functions. The user-supplied function is expected to take at least five input arguments and return three output arguments:

[PEst,ObjEst,Hess] = yourminfunc(F,P0,PLow,PHigh,OptimSet)

with the following input arguments:

and the following output arguments:

If you need to use extra input arguments in your minimization function, enter a cell array instead of a plain function handle:

{@yourminfunc,Arg1,Arg2,...}

In that case, the optimiser will be called the following way:

[PEst,ObjEst,Hess] = yourminfunc(F,P0,PLow,PHigh,Opt,Arg1,Arg2,...)
User-supplied steady-state solver

You can supply a function handle to your own steady-state solver (i.e. a function that finds the steady state for given parameters) through the 'sstate=' option.

The function is expected to take one input argument, the model object with newly assigned parameters, and return at least two output arguments, the model object with a new steady state (or balanced-growth path) and a success flag. The flag is true if the steady state has been successfully computed, and false if not:

[M,Success] = mysstatesolver(M)

It is your responsibility to add the growth characteristics if some of the model variables drift over time. In other words, you need to take care of the imaginary parts of the steady state values in the model object returned by the solver.

Alternatively, you can also run the steady-state solver with extra input arguments (with the model object still being the first input argument). In that case, you need to set the option 'sstate=' to a cell array with the function handle in the first cell, and the other input arguments afterwards, e.g.

'sstate=',{@mysstatesolver,1,'a',X}

The actual function call will have the following form:

[M,Success] = mysstatesolver(M,1,'a',X)

Example