[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.14 Estimation

Provided that you have observations on some endogenous variables, it is possible to use Dynare to estimate some or all parameters. Both maximum likelihood (as in Ireland (2004)) and Bayesian techniques (as in Rabanal and Rubio-Ramirez (2003), Schorfheide (2000) or Smets and Wouters (2003)) are available. Using Bayesian methods, it is possible to estimate DSGE models, VAR models, or a combination of the two techniques called DSGE-VAR.

Note that in order to avoid stochastic singularity, you must have at least as many shocks or measurement errors in your model as you have observed variables.

The estimation using a first order approximation can benefit from the block decomposition of the model (see block).

Command: varobs VARIABLE_NAME…;

Description

This command lists the name of observed endogenous variables for the estimation procedure. These variables must be available in the data file (see estimation_cmd).

Alternatively, this command is also used in conjunction with the partial_information option of stoch_simul, for declaring the set of observed variables when solving the model under partial information.

Only one instance of varobs is allowed in a model file. If one needs to declare observed variables in a loop, the macro-processor can be used as shown in the second example below.

Simple example

 
varobs C y rr;

Example with a loop

 
varobs
@#for co in countries
  GDP_@{co}
@#endfor
;
Block: observation_trends ;

Description

This block specifies linear trends for observed variables as functions of model parameters.

Each line inside of the block should be of the form:

 
VARIABLE_NAME(EXPRESSION);

In most cases, variables shouldn’t be centered when observation_trends is used.

Example

 
observation_trends;
Y (eta);
P (mu/eta);
end;

Block: estimated_params ;

Description

This block lists all parameters to be estimated and specifies bounds and priors as necessary.

Each line corresponds to an estimated parameter.

In a maximum likelihood estimation, each line follows this syntax:

 
stderr VARIABLE_NAME | corr VARIABLE_NAME_1, VARIABLE_NAME_2 | PARAMETER_NAME
, INITIAL_VALUE [, LOWER_BOUND, UPPER_BOUND ];

In a Bayesian estimation, each line follows this syntax:

 
stderr VARIABLE_NAME | corr VARIABLE_NAME_1, VARIABLE_NAME_2 |
PARAMETER_NAME | DSGE_PRIOR_WEIGHT
[, INITIAL_VALUE [, LOWER_BOUND, UPPER_BOUND]], PRIOR_SHAPE,
PRIOR_MEAN, PRIOR_STANDARD_ERROR [, PRIOR_3RD_PARAMETER [,
PRIOR_4TH_PARAMETER [, SCALE_PARAMETER ] ] ];

The first part of the line consists of one of the three following alternatives:

stderr VARIABLE_NAME

Indicates that the standard error of the exogenous variable VARIABLE_NAME, or of the observation error/measurement errors associated with endogenous observed variable VARIABLE_NAME, is to be estimated

corr VARIABLE_NAME1, VARIABLE_NAME2

Indicates that the correlation between the exogenous variables VARIABLE_NAME1 and VARIABLE_NAME2, or the correlation of the observation errors/measurement errors associated with endogenous observed variables VARIABLE_NAME1 and VARIABLE_NAME2, is to be estimated. Note that correlations set by previous shocks-blocks or estimation-commands are kept at their value set prior to estimation if they are not estimated again subsequently. Thus, the treatment is the same as in the case of deep parameters set during model calibration and not estimated.

PARAMETER_NAME

The name of a model parameter to be estimated

DSGE_PRIOR_WEIGHT

The rest of the line consists of the following fields, some of them being optional:

INITIAL_VALUE

Specifies a starting value for maximum likelihood estimation

LOWER_BOUND

Specifies a lower bound for the parameter value in maximum likelihood estimation

UPPER_BOUND

Specifies an upper bound for the parameter value in maximum likelihood estimation

PRIOR_SHAPE

A keyword specifying the shape of the prior density. The possible values are: beta_pdf, gamma_pdf, normal_pdf, uniform_pdf, inv_gamma_pdf, inv_gamma1_pdf, inv_gamma2_pdf. Note that inv_gamma_pdf is equivalent to inv_gamma1_pdf

PRIOR_MEAN

The mean of the prior distribution

PRIOR_STANDARD_ERROR

The standard error of the prior distribution

PRIOR_3RD_PARAMETER

A third parameter of the prior used for generalized beta distribution, generalized gamma and for the uniform distribution. Default: 0

PRIOR_4TH_PARAMETER

A fourth parameter of the prior used for generalized beta distribution and for the uniform distribution. Default: 1

SCALE_PARAMETER

The scale parameter to be used for the jump distribution of the Metropolis-Hasting algorithm

Note that INITIAL_VALUE, LOWER_BOUND, UPPER_BOUND, PRIOR_MEAN, PRIOR_STANDARD_ERROR, PRIOR_3RD_PARAMETER, PRIOR_4TH_PARAMETER and SCALE_PARAMETER can be any valid EXPRESSION. Some of them can be empty, in which Dynare will select a default value depending on the context and the prior shape.

As one uses options more towards the end of the list, all previous options must be filled: for example, if you want to specify SCALE_PARAMETER, you must specify PRIOR_3RD_PARAMETER and PRIOR_4TH_PARAMETER. Use empty values, if these parameters don’t apply.

Example

The following line:

 
corr eps_1, eps_2, 0.5,  ,  , beta_pdf, 0, 0.3, -1, 1;

sets a generalized beta prior for the correlation between eps_1 and eps_2 with mean 0 and variance 0.3. By setting PRIOR_3RD_PARAMETER to -1 and PRIOR_4TH_PARAMETER to 1 the standard beta distribution with support [0,1] is changed to a generalized beta with support [-1,1]. Note that LOWER_BOUND and UPPER_BOUND are left empty and thus default to -1 and 1, respectively. The initial value is set to 0.5.

Similarly, the following line:

 
corr eps_1, eps_2, 0.5,  -0.5,  1, beta_pdf, 0, 0.3, -1, 1;

sets the same generalized beta distribution as before, but now truncates this distribution to [-0.5,1] through the use of LOWER_BOUND and UPPER_BOUND. Hence, the prior does not integrate to 1 anymore.

Parameter transformation

Sometimes, it is desirable to estimate a transformation of a parameter appearing in the model, rather than the parameter itself. It is of course possible to replace the original parameter by a function of the estimated parameter everywhere is the model, but it is often unpractical.

In such a case, it is possible to declare the parameter to be estimated in the parameters statement and to define the transformation, using a pound sign (#) expression (see section Model declaration).

Example

 
parameters bet;

model;
# sig = 1/bet;
c = sig*c(+1)*mpk;
end;

estimated_params;
bet, normal_pdf, 1, 0.05;
end;
Block: estimated_params_init ;

This block declares numerical initial values for the optimizer when these ones are different from the prior mean.

Each line has the following syntax:

 
stderr VARIABLE_NAME | corr VARIABLE_NAME_1, VARIABLE_NAME_2 | PARAMETER_NAME
, INITIAL_VALUE;

See estimated_params, for the meaning and syntax of the various components.

Block: estimated_params_bounds ;

This block declares lower and upper bounds for parameters in maximum likelihood estimation.

Each line has the following syntax:

 
stderr VARIABLE_NAME | corr VARIABLE_NAME_1, VARIABLE_NAME_2 | PARAMETER_NAME
, LOWER_BOUND, UPPER_BOUND;

See estimated_params, for the meaning and syntax of the various components.

Command: estimation [VARIABLE_NAME…];
Command: estimation (OPTIONS…) [VARIABLE_NAME…];

Description

This command runs Bayesian or maximum likelihood estimation.

The following information will be displayed by the command:

Options

datafile = FILENAME

The datafile: a ‘.m’ file, a ‘.mat’ file or, a ‘.xls’/‘.xlsx’ file (the latter format is supported under Octave if the io and java packages from Octave-Forge are installed, along with a Java Runtime Environment)

xls_sheet = NAME

The name of the sheet with the data in an Excel file

xls_range = RANGE

The range with the data in an Excel file

nobs = INTEGER

The number of observations to be used. Default: all observations in the file

nobs = [INTEGER1:INTEGER2]

Runs a recursive estimation and forecast for samples of size ranging of INTEGER1 to INTEGER2. Option forecast must also be specified

first_obs = INTEGER

The number of the first observation to be used. Default: 1

prefilter = INTEGER

A value of 1 means that the estimation procedure will demean the data. Default: 0, i.e. no prefiltering

presample = INTEGER

The number of observations to be skipped before evaluating the likelihood. Default: 0

loglinear

Computes a log-linear approximation of the model instead of a linear approximation. The data must correspond to the definition of the variables used in the model. Default: computes a linear approximation

plot_priors = INTEGER

Control the plotting of priors:

0

No prior plot

1

Prior density for each estimated parameter is plotted. It is important to check that the actual shape of prior densities matches what you have in mind. Ill choosen values for the prior standard density can result in absurd prior densities.

Default value is 1.

nograph

See nograph.

nodisplay

See nodisplay.

graph_format = FORMAT
graph_format = ( FORMAT, FORMAT… )

See graph_format.

lik_init = INTEGER

Type of initialization of Kalman filter:

1

For stationary models, the initial matrix of variance of the error of forecast is set equal to the unconditional variance of the state variables

2

For nonstationary models: a wide prior is used with an initial matrix of variance of the error of forecast diagonal with 10 on the diagonal

3

For nonstationary models: use a diffuse filter (use rather the diffuse_filter option)

4

The filter is initialized with the fixed point of the Riccati equation

Default value is 1. For advanced use only.

lik_algo = INTEGER

For internal use and testing only.

conf_sig = DOUBLE

See conf_sig.

mh_replic = INTEGER

Number of replications for Metropolis-Hastings algorithm. For the time being, mh_replic should be larger than 1200. Default: 20000

sub_draws = INTEGER

number of draws from the Metropolis iterations that are used to compute posterior distribution of various objects (smoothed variable, smoothed shocks, forecast, moments, IRF). sub_draws should be smaller than the total number of Metropolis draws available. Default: min(1200,0.25*Total number of draws)

mh_nblocks = INTEGER

Number of parallel chains for Metropolis-Hastings algorithm. Default: 2

mh_drop = DOUBLE

The fraction of initially generated parameter vectors to be dropped before using posterior simulations. Default: 0.5

mh_jscale = DOUBLE

The scale to be used for the jumping distribution in Metropolis-Hastings algorithm. The default value is rarely satisfactory. This option must be tuned to obtain, ideally, an acceptation rate of 25% in the Metropolis-Hastings algorithm. Default: 0.2

mh_init_scale = DOUBLE

The scale to be used for drawing the initial value of the Metropolis-Hastings chain. Default: 2*mh_scale

mh_recover

Attempts to recover a Metropolis-Hastings simulation that crashed prematurely. Shouldn’t be used together with load_mh_file

mh_mode = INTEGER

mode_file = FILENAME

Name of the file containing previous value for the mode. When computing the mode, Dynare stores the mode (xparam1) and the hessian (hh, only if cova_compute=1) in a file called ‘MODEL_FILENAME_mode.mat

mode_compute = INTEGER | FUNCTION_NAME

Specifies the optimizer for the mode computation:

0

The mode isn’t computed. When mode_file option is specified, the mode is simply read from that file.

When mode_file option is not specified, Dynare reports the value of the log posterior (log likelihood) evaluated at the initial value of the parameters.

When mode_file option is not specified and there is no estimated_params block, but the smoother option is used, it is a roundabout way to compute the smoothed value of the variables of a model with calibrated parameters.

1

Uses fmincon optimization routine (available under MATLAB if the optimization toolbox is installed; not available under Octave)

2

Value no longer used

3

Uses fminunc optimization routine (available under MATLAB if the optimization toolbox is installed; available under Octave if the optim package from Octave-Forge is installed)

4

Uses Chris Sims’s csminwel

5

Uses Marco Ratto’s newrat. This value is not compatible with non linear filters or DSGE-VAR models

6

Uses a Monte-Carlo based optimization routine (see Dynare wiki for more details)

7

Uses fminsearch, a simplex based optimization routine (available under MATLAB if the optimization toolbox is installed; available under Octave if the optim package from Octave-Forge is installed)

8

Uses Dynare implementation of the Nelder-Mead simplex based optimization routine (generally more efficient than the MATLAB or Octave implementation available with mode_compute=7)

9

Uses the CMA-ES (Covariance Matrix Adaptation Evolution Strategy) algorithm, an evolutionary algorithm for difficult non-linear non-convex optimization

FUNCTION_NAME

It is also possible to give a FUNCTION_NAME to this option, instead of an INTEGER. In that case, Dynare takes the return value of that function as the posterior mode.

Default value is 4.

mode_check

Tells Dynare to plot the posterior density for values around the computed mode for each estimated parameter in turn. This is helpful to diagnose problems with the optimizer

prior_trunc = DOUBLE

Probability of extreme values of the prior density that is ignored when computing bounds for the parameters. Default: 1e-32

load_mh_file

Tells Dynare to add to previous Metropolis-Hastings simulations instead of starting from scratch. Shouldn’t be used together with mh_recover

optim = (fmincon options)

Can be used to set options for fmincon, the optimizing function of MATLAB Optimization toolbox. Use MATLAB’s syntax for these options. Default: ('display','iter','LargeScale','off','MaxFunEvals',100000,'TolFun',1e-8,'TolX',1e-6)

nodiagnostic

Doesn’t compute the convergence diagnostics for Metropolis-Hastings. Default: diagnostics are computed and displayed

bayesian_irf

Triggers the computation of the posterior distribution of IRFs. The length of the IRFs are controlled by the irf option. Results are stored in oo_.PosteriorIRF.dsge (see below for a description of this variable)

dsge_var

Triggers the estimation of a DSGE-VAR model, where the weight of the DSGE prior of the VAR model will be estimated. The prior on the weight of the DSGE prior, dsge_prior_weight, must be defined in the estimated_params section. NB: The previous method of declaring dsge_prior_weight as a parameter and then placing it in estimated_params is now deprecated and will be removed in a future release of Dynare.

dsge_var = DOUBLE

Triggers the estimation of a DSGE-VAR model, where the weight of the DSGE prior of the VAR model is calibrated to the value passed. NB: The previous method of declaring dsge_prior_weight as a parameter and then calibrating it is now deprecated and will be removed in a future release of Dynare.

dsge_varlag = INTEGER

The number of lags used to estimate a DSGE-VAR model. Default: 4.

moments_varendo

Triggers the computation of the posterior distribution of the theoretical moments of the endogenous variables. Results are stored in oo_.PosteriorTheoreticalMoments (see below for a description of this variable)

conditional_variance_decomposition = INTEGER

See below.

conditional_variance_decomposition = [INTEGER1:INTEGER2]

See below.

conditional_variance_decomposition = [INTEGER1 INTEGER2 …]

Computes the posterior distribution of the conditional variance decomposition for the specified period(s). The periods must be strictly positive. Conditional variances are given by $var(y_{t+k}\vert t)$. For period 1, the conditional variance decomposition provides the decomposition of the effects of shocks upon impact. The results are stored in oo_.PosteriorTheoreticalMoments.dsge.ConditionalVarianceDecomposition, but currently there is no output. Note that this option requires the option moments_varendo to be specified.

filtered_vars

Triggers the computation of the posterior distribution of filtered endogenous variables/one-step ahead forecasts, i.e. $E_{t}{y_{t+1}}$. Results are stored in oo_.FilteredVariables (see below for a description of this variable)

smoother

Triggers the computation of the posterior distribution of smoothered endogenous variables and shocks, i.e. the expected value of variables and shocks given the information available in all observations up to the final date ($E_{T}{y_t}$). Results are stored in oo_.SmoothedVariables, oo_.SmoothedShocks and oo_.SmoothedMeasurementErrors. Also triggers the computation of oo_.UpdatedVariables, which contains the estimation of the expected value of variables given the information available at the current date ($E_{t}{y_t}$). See below for a description of all these variables.

forecast = INTEGER

Computes the posterior distribution of a forecast on INTEGER periods after the end of the sample used in estimation. If no Metropolis-Hastings is computed, the result is stored in variable oo_.forecast and corresponds to the forecast at the posterior mode. If a Metropolis-Hastings is computed, the distribution of forecasts is stored in variables oo_.PointForecast and oo_.MeanForecast. See section Forecasting, for a description of these variables.

tex

Requests the printing of results and graphs in TeX tables and graphics that can be later directly included in LaTeX files (not yet implemented)

kalman_algo = INTEGER

kalman_tol = DOUBLE

filter_covariance

Saves the series of one step ahead error of forecast covariance matrices.

filter_step_ahead = [INTEGER1:INTEGER2]

Triggers the computation k-step ahead filtered values. Stores results in oo_.FilteredVariablesKStepAhead and oo_.FilteredVariablesKStepAheadVariances.

filter_decomposition

Triggers the computation of the shock decomposition of the above k-step ahead filtered values.

constant

noconstant

diffuse_filter

Uses the diffuse Kalman filter (as described in Durbin and Koopman (2001) and Koopman and Durbin (2003)) to estimate models with non-stationary observed variables.

When diffused_filter is used the lik_init option of estimation has no effect.

When there are nonstationary variables in a model, there is no unique deterministic steady state. The user must supply a MATLAB/Octave function that computes the steady state values of the stationary variables in the model and returns dummy values for the nonstationary ones. The function should be called with the name of the ‘.mod’ file followed by ‘_steadystate’. See ‘fs2000_steadystate.m’ in ‘examples’ directory for an example.

Note that the nonstationary variables in the model must be integrated processes (their first difference or k-difference must be stationary).

selected_variables_only

Only run the smoother on the variables listed just after the estimation command. Default: run the smoother on all the declared endogenous variables.

cova_compute = INTEGER

When 0, the covariance matrix of estimated parameters is not computed after the computation of posterior mode (or maximum likelihood). This increases speed of computation in large models during development, when this information is not always necessary. Of course, it will break all successive computations that would require this covariance matrix. Otherwise, if this option is equal to 1, the covariance matrix is computed and stored in variable hh of ‘MODEL_FILENAME_mode.mat’. Default is 1.

solve_algo = INTEGER

See solve_algo.

order = INTEGER

Order of approximation, either 1 or 2. When equal to 2, the likelihood is evaluated with a particle filter based on a second order approximation of the model (see Fernandez-Villaverde and Rubio-Ramirez (2005)). Default is 1, ie the lilkelihood of the linearized model is evaluated using a standard Kalman filter.

irf = INTEGER

See irf. Only used if bayesian_irf is passed.

irf_shocks = ( VARIABLE_NAME [[,] VARIABLE_NAME …] )

See irf_shocks. Only used if bayesian_irf is passed. Cannot be used with dsge_var.

aim_solver

See aim_solver.

sylvester = OPTION

See sylvester.

sylvester_fixed_point_tol = DOUBLE

See sylvester_fixed_point_tol.

lyapunov = OPTION

Determines the algorithm used to solve the Laypunov equation to initialized the variance-covariance matrix of the Kalman filter using the steady-state value of state variables. Possible values for OPTION are:

default

Uses the default solver for Lyapunov equations based on Bartels-Stewart algorithm.

fixed_point

Uses a fixed point algorithm to solve the Lyapunov equation. This method is faster than the default one for large scale models, but it could require a large amount of iterations.

doubling

Uses a doubling algorithm to solve the Lyapunov equation (disclyap_fast). This method is faster than the two previous one for large scale models.

square_root_solver

Uses a square-root solver for Lyapunov equations (dlyapchol). This method is fast for large scale models (available under MATLAB if the control system toolbox is installed; available under Octave if the control package from Octave-Forge is installed)

Default value is default

lyapunov_fixed_point_tol = DOUBLE

This is the convergence criterion used in the fixed point lyapunov solver. Its default value is 1e-10.

lyapunov_doubling_tol = DOUBLE

This is the convergence criterion used in the doubling algorithm to solve the lyapunov equation. Its default value is 1e-16.

analytic_derivation

Triggers estimation with analytic gradient. The final hessian is also computed analytically. Only works for stationary models without missing observations.

Note

If no mh_jscale parameter is used in estimated_params, the procedure uses mh_jscale for all parameters. If mh_jscale option isn’t set, the procedure uses 0.2 for all parameters.

Output

After running estimation, the parameters M_.params and the variance matrix M_.Sigma_e of the shocks are set to the mode for maximum likelihood estimation or posterior mode computation without Metropolis iterations.

After estimation with Metropolis iterations (option mh_replic > 0 or option load_mh_file set) the parameters M_.params and the variance matrix M_.Sigma_e of the shocks are set to the posterior mean.

Depending on the options, estimation stores results in various fields of the oo_ structure, described below.

In the following variables, we will adopt the following shortcuts for specific field names:

MOMENT_NAME

This field can take the following values:

HPDinf

Lower bound of a 90% HPD interval(3)

HPDsup

Upper bound of a 90% HPD interval

Mean

Mean of the posterior distribution

Median

Median of the posterior distribution

Std

Standard deviation of the posterior distribution

deciles

Deciles of the distribution.

density

Non parametric estimate of the posterior density. First and second columns are respectively abscissa and ordinate coordinates.

ESTIMATED_OBJECT

This field can take the following values:

measurement_errors_corr

Correlation between two measurement errors

measurement_errors_std

Standard deviation of measurement errors

parameters

Parameters

shocks_corr

Correlation between two structural shocks

shocks_std

Standard deviation of structural shocks

MATLAB/Octave variable: oo_.MarginalDensity.LaplaceApproximation

Variable set by the estimation command.

MATLAB/Octave variable: oo_.MarginalDensity.ModifiedHarmonicMean

Variable set by the estimation command, if it is used with mh_replic > 0 or load_mh_file option.

MATLAB/Octave variable: oo_.FilteredVariables

Variable set by the estimation command, if it is used with the filtered_vars option. Fields are of the form:

 
oo_.FilteredVariables.VARIABLE_NAME
MATLAB/Octave variable: oo_.FilteredVariablesKStepAhead

Variable set by the estimation command, if it is used with the filter_step_ahead option.

MATLAB/Octave variable: oo_.FilteredVariablesKStepAheadVariances

Variable set by the estimation command, if it is used with the filter_step_ahead option.

MATLAB/Octave variable: oo_.PosteriorIRF.dsge

Variable set by the estimation command, if it is used with the bayesian_irf option. Fields are of the form:

 
oo_.PosteriorIRF.dsge.MOMENT_NAME.VARIABLE_NAME_SHOCK_NAME
MATLAB/Octave variable: oo_.SmoothedMeasurementErrors

Variable set by the estimation command, if it is used with the smoother option. Fields are of the form:

 
oo_.SmoothedMeasurementErrors.VARIABLE_NAME
MATLAB/Octave variable: oo_.SmoothedShocks

Variable set by the estimation command, if it is used with the smoother option. Fields are of the form:

 
oo_.SmoothedShocks.VARIABLE_NAME
MATLAB/Octave variable: oo_.SmoothedVariables

Variable set by the estimation command, if it is used with the smoother option. Fields are of the form:

 
oo_.SmoothedVariables.VARIABLE_NAME
MATLAB/Octave variable: oo_.UpdatedVariables

Variable set by the estimation command, if it is used with the smoother option. Contains the estimation of the expected value of variables given the information available at the current date. Fields are of the form:

 
oo_.UpdatedVariables.VARIABLE_NAME
MATLAB/Octave variable: oo_.PosteriorTheoreticalMoments

Variable set by the estimation command, if it is used with the moments_varendo option. Fields are of the form:

 
oo_.PosteriorTheoreticalMoments.dsge.THEORETICAL_MOMENT.ESTIMATED_OBJECT.MOMENT_NAME.VARIABLE_NAME

where THEORETICAL_MOMENT is one of the following:

covariance

Variance-covariance of endogenous variables

correlation

Auto- and cross-correlation of endogenous variables. Fields are vectors with correlations from 1 up to order options_.ar

VarianceDecomposition

Decomposition of variance(4)

ConditionalVarianceDecomposition

Only if the conditional_variance_decomposition option has been specified

MATLAB/Octave variable: oo_.posterior_density

Variable set by the estimation command, if it is used with mh_replic > 0 or load_mh_file option. Fields are of the form:

 
oo_.posterior_density.PARAMETER_NAME
MATLAB/Octave variable: oo_.posterior_hpdinf

Variable set by the estimation command, if it is used with mh_replic > 0 or load_mh_file option. Fields are of the form:

 
oo_.posterior_hpdinf.ESTIMATED_OBJECT.VARIABLE_NAME
MATLAB/Octave variable: oo_.posterior_hpdsup

Variable set by the estimation command, if it is used with mh_replic > 0 or load_mh_file option. Fields are of the form:

 
oo_.posterior_hpdsup.ESTIMATED_OBJECT.VARIABLE_NAME
MATLAB/Octave variable: oo_.posterior_mean

Variable set by the estimation command, if it is used with mh_replic > 0 or load_mh_file option. Fields are of the form:

 
oo_.posterior_mean.ESTIMATED_OBJECT.VARIABLE_NAME
MATLAB/Octave variable: oo_.posterior_mode

Variable set by the estimation command, if it is used with mh_replic > 0 or load_mh_file option. Fields are of the form:

 
oo_.posterior_mode.ESTIMATED_OBJECT.VARIABLE_NAME
MATLAB/Octave variable: oo_.posterior_std

Variable set by the estimation command, if it is used with mh_replic > 0 or load_mh_file option. Fields are of the form:

 
oo_.posterior_std.ESTIMATED_OBJECT.VARIABLE_NAME

Here are some examples of generated variables:

 
oo_.posterior_mode.parameters.alp
oo_.posterior_mean.shocks_std.ex
oo_.posterior_hpdsup.measurement_errors_corr.gdp_conso
Command: model_comparison FILENAME[(DOUBLE)]…;
Command: model_comparison (marginal_density = laplace | modifiedharmonicmean) FILENAME[(DOUBLE)]…;

Description

This command computes odds ratios and estimate a posterior density over a collection of models. The priors over models can be specified as the DOUBLE values, otherwise a uniform prior is assumed.

Example

 
model_comparison my_model(0.7) alt_model(0.3);

This example attributes a 70% prior over my_model and 30% prior over alt_model.

Command: shock_decomposition [VARIABLE_NAME]…;
Command: shock_decomposition (OPTIONS…) [VARIABLE_NAME]…;

Description

This command computes and displays shock decomposition according to the model for a given sample.

Note that this command must come after either estimation (in case of an estimated model) or stoch_simul (in case of a calibrated model).

Options

parameter_set = PARAMETER_SET

Specify the parameter set to use for running the smoother. The PARAMETER_SET can take one of the following five values: calibration, prior_mode, prior_mean, posterior_mode, posterior_mean, posterior_median. Default value: posterior_mean if Metropolis has been run, else posterior_mode.

shocks = (VARIABLE_NAME [VARIABLE_NAME …] [ ; VARIABLE_NAME [VARIABLE_NAME …] …] )

labels = ( VARIABLE_NAME [VARIABLE_NAME …] )

datafile = FILENAME

See datafile. Useful when computing the shock decomposition on a calibrated model.

Command: unit_root_vars VARIABLE_NAME…;

This command is deprecated. Use estimation option diffuse_filter instead for estimating a model with non-stationary observed variables or steady option nocheck to prevent steady to check the steady state returned by your steady state file.

Dynare also has the ability to estimate Bayesian VARs:

Command: bvar_density ;

Computes the marginal density of an estimated BVAR model, using Minnesota priors.

See ‘bvar-a-la-sims.pdf’, which comes with Dynare distribution, for more information on this command.

Dynare can also run the smoother on a calibrated model:

Command: calib_smoother [VARIABLE_NAME]…;
Command: calib_smoother (OPTIONS…) [VARIABLE_NAME]…;

Description

This command computes the smoothed variables (and possible the filtered variables) on a calibrated model.

A datafile must be provided, and the observable variables declared with varobs. The smoother is based on a first-order approximation of the model.

By default, the command computes the smoothed variables and shocks and stores the results in oo_.SmoothedVariables and oo_.SmoothedShocks. It also fills oo_.UpdatedVariables.

Options

datafile = FILENAME

See datafile.

filtered_vars

Triggers the computation of filtered variables. See filtered_vars, for more details.

filter_step_ahead = [INTEGER1:INTEGER2]

See filter_step_ahead.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Build Daemon user on May 30, 2013 using texi2html 1.82.