Measurement error parameter on the bound

Dear All,

I am working with non-linear estimation and for this reason I have included measurement errors.
The dataset is generated from a third-order (stoch_simul, order=3) approximation of the model.

When I run the mode_compute step (using CMAES, algorithm number 9 with 1 000 000 function evaluations and 100 000 iterations) , I obtain the attached mode_check plot.

I see the line for the mode is centered on the maximum of the log-likelihood BUT the standard deviations of the measurement errors touch their respective prior bounds.

Can I trust these values or should I interpret this as an identification issue?

How would you solve this issue?

Many thanks


posterior.pdf (54.3 KB)

alp, 0.4;
bet, 0.99;
tet, 0.357;
tau, 50;
delt, 0.02;
rho, 0.95;
stderr e_a, .035;
stderr y, .0175;
stderr l, .00312;
stderr i, .00465;

alp, uniform_pdf, 0.0001, 0.99;
bet, beta_pdf,0.97,0.025;
tet, uniform_pdf, 0.0001, .999;
tau, uniform_pdf, 0.0001, 100;
delt, uniform_pdf, 0.0001, 0.05;
rho, beta_pdf,0.95,0.04;
stderr e_a, inv_gamma_pdf,0.035,4;
stderr y, uniform_pdf, 0.00001, 0.1;
stderr l, uniform_pdf, 0.00001, 0.1;
stderr i, uniform_pdf, 0.00001, 0.1;

That is not an identification issue, but rather there is no interior solution given your prior bounds. Did you set prior_trunc=0?

Dear Professor Pfeifer

Many thanks for your reply.

The option prior_trunc was set 1e-10. I have played around with it by decreasing it to zero and by increasing it to 1e-2. Unfortunately, nothing has changed.

Might it be that the measurement error is actually zero and so the optimizer is trying to indeed reaching a zero standard deviation?
As I mentioned, I am using simulated data by means of stoch_simul order 3 and estimating the model using order 2. (My ultimate aim is to assess the performance of different filters within a monte-carlo exercise.)

Many thanks again for your availability.

ckf_trunc_1eminus32.pdf (52.5 KB)
ckf_trunc_0.pdf (127.1 KB)
ckf_trunc_1eminus10.pdf (129.2 KB)


prior_trunc cannot help here, since the issue is concerning a parameter with a uniform prior. The standard deviation of y is reaching the lower bound of the prior. Did you try to set the lower bound to zero?

The problem is that all the measurement errors are required to evaluate the likelihood, otherwise you will face a singularity issue. I have already done the same kind of exercise with simulated data coming from a global approximation of the model… So it should work.


Dear Stefan,

This seems indeed to solve the issue (or at least improving the situation). Many thanks!

ckf_zero_low_bound_mode_check.pdf (129.7 KB)

ckf_zero_low_bound_smooth.pdf (47.5 KB)

Best regards

As this is a simulation exercise, you might want to think about having measurement error in the simulated data. The particle filter requires measurement error to be present, while your data does not feature it. Hence, the posterior model will be close to 0.

Dear Professor Pfeifer,

Many thanks for your advise.

I have tried simulating observable variables with measurement errors as exogenous variables but Dynare does not seem to account for the measurement error.

I have tried several syntaxes as for instance:

% TRY 1: [AS IN THE GUIDE] The model solves but shock e_a is not simulated

stderr e_a, NORMAL_PDF, 0, 0.035;
stderr e_y_ME, NORMAL_PDF, 0, 0.0175;
stderr e_l_ME, NORMAL_PDF, 0, 0.00312;
stderr e_i_ME, NORMAL_PDF, 0, 0.00465;


TRY 2: In this way, Dynare simulates shock e_a while considering ME as 0

var e_a; stderr 0.035;


stderr e_y_ME, NORMAL_PDF, 0, 0.0175;
stderr e_l_ME, NORMAL_PDF, 0, 0.00312;
stderr e_i_ME, NORMAL_PDF, 0, 0.00465;

Test file:
RBC_base_sim_ME.mod (2.2 KB)

I will try by appending additive measurement errors to observable variables by simulating them in Matlab as:

Y_obs = Y + standard_error_Y.*randn(1,500);

Best regards,