Estimation of parameters

Hello Professor,
I am still facing the problem of estimation after performing the adequate transformation on data. I used five observables and added five observations equation to my model but with annual data. However the code did not run. I can’t understand the reason. The following error message pops up:
initial_estimation_checks:: The forecast error variance in the multivariate Kalman filter became singular.
initial_estimation_checks:: This is often a sign of stochastic singularity, but can also sometimes happen by chance
initial_estimation_checks:: for a particular combination of parameters and data realizations.
initial_estimation_checks:: If you think the latter is the case, you should try with different initial values for the estimated parameters.

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):

Error using initial_estimation_checks (line 143)
initial_estimation_checks:: The forecast error variance in the multivariate Kalman filter became

Error in initial_estimation_checks (line 143)
error(‘initial_estimation_checks:: The forecast error variance in the multivariate Kalman
filter became singular.’)

Error in dynare_estimation_1 (line 165)
oo_ =

Error in dynare_estimation (line 105)

Error in Med902e (line 364)
oo_recursive_=dynare_estimation(var_list_); (12.6 KB)

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

You have stochastic singularity, i.e. the model implies a perfect linear combination of observables. In this case, having as many shocks as observables is not sufficient. Typical examples are observing all components of the budget constraint. You need to find out where the problem comes from. Start by dropping one observable at a time.

Hello Professor,
I did perform the estimation by dropping the variables one at a time. Finally I got an out wiyh only one observable y_obs. The result does not look fine. I did not get the graph as expected nor the posterior means and variance of parameters. I attached the file of output for your (3.9 KB)

  1. That still does not tell you where exactly the problem is.
  2. You should have a look at the mode_check plots. They should tell you where potential problems are that may give rise to a non-positive definite Hessian

Hello professor,
I used the mode_check plots and the graph are not what I expected. As for the parameters, the estimations provided the output I attached. I used only y as observable though the problem is still hanging. I got an error message as follows:
(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!

In dynare_estimation_1 (line 316)
In dynare_estimation (line 105)
In Med902e (line 349)
In dynare (line 223)

However, some nice values are generated for the posterior of parameters distribution ars follows:

Fval obtained by the minimization routine (minus the posterior/likelihood)): 41.410366
Most negative variance -9612.878957 for parameter 19 (phidk = 0.298915)

prior mean mode s.d. prior pstdev

theta 0.330 0.2284 0.0000 beta 0.0200
bet 0.900 0.8994 0.0010 beta 0.0010
gam 1.500 1.5017 0.0050 gamm 0.0050
rho 0.800 0.8171 0.0000 beta 0.0500
rhor 0.800 0.7991 0.0077 beta 0.0100
rhogc 0.170 0.1707 0.0031 beta 0.1000
rhogi 0.500 0.5388 0.0120 beta 0.1000
rhoc 0.800 0.8129 0.0201 beta 0.1000
rhok 0.830 0.8381 0.0266 beta 0.1000
rhow 0.500 0.5058 0.0060 beta 0.1000
phipi 1.500 1.4983 0.0221 norm 0.2500
phiy 0.125 0.1280 0.0050 norm 0.0500
phigc 0.300 0.3010 0.0039 norm 0.1000
phigi 0.300 0.2997 0.0040 norm 0.1000
phic 1.400 1.4023 0.0517 gamm 0.1500
phik 1.400 1.3968 0.0000 gamm 0.2500
phiw 0.760 0.7590 0.0060 gamm 0.1500
phidc 0.300 0.3035 0.0000 norm 0.1000
phidk 0.300 0.2989 0.0020 norm 0.1000
phidw 3.000 2.9910 0.0109 norm 0.0100

Log data density [Laplace approximation] is -112.803228.

The full outcome is attached (53.2 KB)

At least two things:

  1. There seem to be identification issues here. Some likelihoods are completely flat. Run identification on your model
  2. Some of the interior red dots in the mode_check-plots are strange. Enable options_.debug=1 before estimation to see the error codes.

Good day Professor, as I am trying to run a model but there is this error message I got ‘’ syntax error unexpected_ float number’’. Please what does it mean and how would I resolve it.

Without the code it is impossible to tell

Hello professor,
I run the identification to find out the issue with the estimation and the outcome indicates that the number of moments with non-zero derivative is smaller than the number of parameters
This message comes out repeatedly. I attached the outcome for your appreciation. From that, I seem to understand that there are lot of parameters to estimate. I wonder whether I should get rid of some parameter and if that is the case how should I choose those to estimate.
Secondly, the second point in your comment regarding option_debug=1 is not clear for me. I do not know how to apply it to the code and what it is meant (541 Bytes)

Can the statement in bold letters above be generalized to “Typical examples are observing all components of a given equation”? I tried to estimate the basic NK model (Gali Ch.4) with simulated data on y_gap, i, and pi. But I got the error in this thread.

I dropped observable y_gap or replaced it with observable y in varobs;, and there are no problems.

y_gap appears in these equations

[name='New Keynesian Phillips Curve eq. (22)']

[name='Dynamic IS Curve eq. (23)']

[name='Definition output gap']

Is the problem coming from the Phillips curve in this case?

Yes. But that’s not a typical example, but rather the exact issue. Observing all components of a model equation.

1 Like