Dear All,
I am trying to use gaussian filter for estimating a small-scale DSGE model.
I have tried with several different mode_computes and wanted to share some results:
-
mode_compute=6 :
The novelty (at least to me) is that often does not manage to deal with the hessian:
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate.
RCOND = 6.626260e-18.
Error using chol : Matrix must be positive definite. -
mode_compute = 7
It seems to be the most robust and It manages almost always to provide a result.
The mode_check plots are not smooth but it looks like to always find a maximum - see attachment.
Is the simplex algorithm a local or global algorithm? -
mode_compute=5 with optim = (‘Hessian’, 0)"
Is also robust but It gets stuck in the initialization values. -
mode_compute = 9
Seems not to be robust. I read in document on CMAES (I could not find again the file to link it) that this **
** algorithm should be robust to the issue of the Hessian. However, I know in Dynare, It is not. Is there any **
** specific reason for this?
Unfortunately, when I try to estimate more than 6-7 parameters, the Hessian evaluated at the mode of the posterior distribution is often non-positive. For this reason, I have tried to use the option mcmc_jumping_covariance = identity_matrix, Is the following synthax correct?
%----------------------------
% NON-LINEAR ESTIMATION
%---------------------------
// enable pruning
options_.particle.pruning = 1;
// order 3 estimation is not implemented yet.
options_.particle.perturbation = 2;
// use a first order approximation to initialize the state covariance
options_.particle.initialization = 1;
// skip hessian calculation
options_.cova_compute = 1;
%--------------------------------------------
% Estimation command
%--------------------------------------------
estimation(datafile=‘simulated_trend_2_phi_par1.xls’, order=2, nobs=900,
filter_algorithm=gf,
distribution_approximation=cubature,
mode_compute=0,
mode_file=ASNL_estNL_mode,
mh_replic=30000, mh_nblocks=4, mh_jscale=0.1,
mcmc_jumping_covariance = identity_matrix,
mode_check, graph_format=(eps,fig))
PIE_obs Y_obs I_obs;
I am asking because I get usually the following error at this point: (Using Dynare 4.5.4 the below code is from check_posterior_sampler_options.m)
% here are all samplers requiring a proposal distribution
if ~strcmp(posterior_sampler_options.posterior_sampling_method,‘slice’)
if ~options_.cova_compute && ~(options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix)
skipline()
disp(‘check_posterior_sampler_options:: I cannot start the MCMC because the Hessian of the posterior kernel at the mode was not computed’)
disp('check_posterior_sampler_options:: or there is no previous MCMC to load ')
error(‘check_posterior_sampler_options:: MCMC cannot start’)
end
end
Many thanks for any possible comment.
Best regards,
D