Estimated_para_init command

Dear Prof Pfeifer,
I doing an estimation on a model with command “option-.debug=1” to check for the error with the code. The message is as follows:
Error in computing likelihood for initial parameter values

ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.

ESTIMATION_CHECKS: If this is not a problem with the setting of options (check the error message below),

ESTIMATION_CHECKS: you should try using the calibrated version of the model as starting values. To do

ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation

ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):
I understood that I need to specify the command estimated_params_init. I do not understand how to specify this command in my code. I’ve just entered the command with option use calibration before and after the command estimation but I did not get any outcome.
I will appreciate if you could provide me with an insight on the usage of the command to perform the estimation.

Does the estimation work when you do not use the estimated_params_init section? Just using the prior means…

No the estimation does not run. Though the stock simul command works properly. But when I try to match the model to data, the code crashes.

Please post your code.

These are my code and data file.Data.xlsx (24.7 KB)
Mcode.mod (6.9 KB)

On a quick look, I noticed that your measurement errors also enter your other model equations. For example,



This is not the convention. The structural shocks will usually not enter the measurement equations ( unless say it is a stochastic growth shock like in the Lubik and Schorfheide open macro papers…)…and vice versa.

Also another point, your UIP condition looks a bit strange

//Exchange rate and parity condition 

It should be a purely forward-looking equation. Backward-looking terms can be introduced using other strategies, but the basic equation should look like :

//Exchange rate and parity condition 
q(+1) - q = (r -pie(+1))- (r_f -pie_w(+1))+e_q;

Not sure if these are the causes of the problem, but you could try these corrections…
Will have a better look later.


Usually, the problem that a model runs with simulations but not estimation comes from a unit root. In that case, you need the diffuse_filter-option.