Parameter estimation


I experience some errors in my estimation (attached the code and data if anyone would like to take a look) :

78.3% of the prior support gives unique saddle-path solution.
0.0% of the prior support gives explosive dynamics.
21.6% of the prior support gives indeterminacy.
Smirnov statistics in driving acceptable behaviour
psi_pi d-stat = 0.524 p-value = 0.000
psi_pis d-stat = 0.524 p-value = 0.000

Smirnov statistics in driving indeterminacy
psi_pi d-stat = 0.410 p-value = 0.000
psi_pis d-stat = 0.410 p-value = 0.000

Starting bivariate analysis:

Correlation analysis for prior_stable
[tetas,psi_y]: corrcoef = -0.097

Correlation analysis for prior_unacceptable
[teta_f,rho_gs]: corrcoef = 0.188
[fi,rhos]: corrcoef = 0.153
[h,rho_cp]: corrcoef = 0.167
[psi_pi,psi_pis]: corrcoef = -0.591
[tetas,psi_y]: corrcoef = 0.357

Correlation analysis for prior_indeterm
[teta_f,rho_gs]: corrcoef = 0.188
[fi,rhos]: corrcoef = 0.153
[h,rho_cp]: corrcoef = 0.167
[psi_pi,psi_pis]: corrcoef = -0.591
[tetas,psi_y]: corrcoef = 0.357
Computing theoretical moments …
Undefined function ‘Sigma_e_’ for input arguments of type ‘double’.
NK.rar (249 KB)

Can anyone give an answer ?

I managed to obtain

All parameter values in the specified ranges give unique saddle-path solution!

but there’s something wrong although,

Computing theoretical moments …
Undefined function ‘Sigma_e_’ for input arguments of type ‘double’.

Error in set_shocks_param (line 42)
Sigma_e(k1,k2) = xparam1(i+offset)*sqrt(Sigma_e_(k1,k1)*Sigma_e_(k2,k2));

Error in mc_moments (line 34)

Error in map_ident_ (line 58)
[vdec, cc, ac] = mc_moments(T, lpmatx, oo_.dr);

Error in dynare_sensitivity (line 239)

Error in cod_original (line 323)

Error in dynare (line 180)
evalin(‘base’,fname) ;

When i use “identification” command :

Testing ML Starting value
Error using .*
Matrix dimensions must agree.

f1 f1 :slight_smile:

That is a bug. We will look into it and keep you posted.

how can i test gelman brooks convergence ?

By running two MCMC chains with at least 2000 observations, i.e.

initial value of the log posterior : -121.3284

(minus) the hessian matrix at the “mode” is not positive definite!
=> posterior variance of the estimated parameters are not positive.
You should try to change the initial values of the parameters using
the estimated_params_init block, or use another optimization routine.
Warning: The results below are most likely wrong!

Search the forum for that one. At least 5 percent of the posts used to deal with this.

After estimation, 4 of my shocks have 0 std err and t statistic. only one has 0.9879 1.0512 . most constants provide the same pair of values for (std err, t stat) :0 .
also, the smooth shocks graph looks like a white noise for 2 of them .
this is definitely a bad estimation, but i don t understand what is the cause: constants or missmatch between the data/variab ?

Please post the most recent version.

BUN.mod (3.73 KB)

The data file is also required.

Attached an archive with code & data file.

If the mle analysis is performed, although dynare notifies me that the estimation is most likely wrong due to the negative hessian, why aren’t confidence intervals computed ?
what else can i use to test the strength of the model ?
i’m also not sure what algorhytm to select in the "estimation"function if i don’t perform bayesian estim. so far i have used only 4 and 6.

y corresponds to the o.g. (log deviation of the trend from gdp)
i - interest rate ( diff(1) to obtain a stationary distrib)
pi - inflation rate, obtained as log diff of price index
s - real exchange rate (log diff for the same reason - stationarity) .

i tried to estimate parameters without the shocks block in order to identify the param that have issues.
the identification strength & the sensivity component with moments inf matrix plots show only blue columns (relative to param value) ; relative to prior std which should have been plotted with red are smaller than the blue ones and they don t overlap or… ?

thank you very much professor.
Test.rar (14.1 KB)

A lot of things:

  1. All parameters are identified. That is not the source of your problems. The observation equations are. See below. That something is severely wrong can be seen in the fact that many parameters like psi_y or nui are at their upper bounds at the mode. That always results in a non-positive definite Hessian as you did not find an interior maximum.
  2. Without Bayesian estimation and a specified prior, identification cannot display identification strenght relative to the prior mean.
  3. Confidence intervals for what? You get mean and standard deviation for the parameter. CI for the parameters directly follow. For IRFs, you need to add the bayesian_irf-option
  4. Finding the mode to your model is hard. Use mode_compute=6,9 or 10.
  5. Your observation equations are wrong. The way you do it currently, e.g. pi has mean 0 in the model, but is not demeaned in the data. Similarly, the interest rate in the model is not in first differences, but your data is. You cannot say they are equal. You need to fix that. See Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” for details.
1 Like