Setting parameters at the posterior mode

Dear All,

I would like to perform a non-linear estimation exercise by setting the starting points of the parameters at the posterior mode from a complete linear estimation e.g mode compute plus MC exploration.

Would the following set of commands perform what I need?

STEP 1: set parameters at the mode
set_param_value(‘alpha’,oo_.posterior_mode.parameters.alpha);
%
M_.Sigma_e(1,1)=oo_.posterior_mode.shocks_std.epsM.^2;
M_.Sigma_e(2,2)=oo_.posterior_mode.shocks_std.epsZ.^2;

STEP 2: define priors starting point:
estimated_params;

alpha, alpha, , , uniform_pdf, , , 0.3, 1;

stderr epsM, 0.06, , , uniform_pdf, , , 0.00001, 100;
stderr epsZ, 0.07, , , uniform_pdf, , , 0.00001, 100;

ME
stderr C_obs, 0.004, uniform_pdf, 0.00001, 100;
end;

If this is fine, is there a way of calling elements from the shock standard deviation matrix M_.Sigma_e within the prior block?

In STEP 1, alternatively, I was considering using a string match on elements of matrix M_. after the command:

param_post_mode=get_posterior_parameters(‘mode’,M_,estim_params_,oo_,‘lik_’)
% INPUTS
% o type [char] = ‘mode’ or ‘mean’.
% o M_: [structure] Dynare structure describing the model.
% o estim_params_: [structure] Dynare structure describing the estimated parameters.
% o field_1 [char] optional field like ‘mle_’.

Many thanks in advance.

Best regards,

DB

If you are doing it within one mod-file, then the parameters should already be correctly set. Otherwise, you can use

parameters = get_posterior_parameters('mean',M_,estim_params_,oo_,options_);
M_ = set_all_parameters(parameters,estim_params_,M_);

to read and set the parameters and use the

estimated_params_init(use_calibration);
end;

block to initialize.