Error in computing likelihood for initial parameter values

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Error in computing likelihood for initial parameter values

Postby rwhitt01 » Mon Mar 30, 2015 10:16 am

wm3.mod
Data and mod
(3.94 KiB) Downloaded 91 times
Hello,

I am trying to estimate the Gali & Monacelli, NBER w.p. 8905 model using CPI data from Fred, but I keep getting these errors(see below). I have read the forms, but I had no luck resolving the issue. If someone could be so kind to point me in the right direction it would be greatly appreciated.
Thank you in advance.

Regards,
Richard


output
-----------------
>> dynare wm3

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
Found 18 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.


STEADY-STATE RESULTS:

y_os 0
mc_os 0
ppi_os 0
r_os 0
a_os 0
a 0
ygap 0
ppi_h 0
rnat 0
r 0
y 0
yflex 0
ppi 0
s 0
q 0
e 0
p_h 0
cpi_level 0

You did not declare endogenous variables after the estimation/calib_smoother command.

Loading 180 observations from data.mat

Warning: Matrix is singular to working precision.
> In lyapunov_symm at 145
In dsge_likelihood at 374
In initial_estimation_checks at 47
In dynare_estimation_1 at 179
In dynare_estimation at 89
In wm3 at 251
In dynare at 180
Warning: Matrix is singular to working precision.
> In kalman_filter at 182
In dsge_likelihood at 646
In initial_estimation_checks at 47
In dynare_estimation_1 at 179
In dynare_estimation at 89
In wm3 at 251
In dynare at 180
Error in computing likelihood for initial parameter values

ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
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 print_info (line 98)
Likelihood is not a number (NaN) or a complex number

Error in print_info (line 98)
error('Likelihood is not a number (NaN) or a complex number');

Error in initial_estimation_checks (line 69)
print_info(info, DynareOptions.noprint, DynareOptions)

Error in dynare_estimation_1 (line 179)
oo_ = initial_estimation_checks(objective_function,xparam1,dataset_,M_,estim_params_,options_,bayestopt_,oo_);

Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);

Error in wm3 (line 251)
dynare_estimation(var_list_);

Error in dynare (line 180)
evalin('base',fname) ;
rwhitt01
 
Posts: 23
Joined: Tue Nov 11, 2014 5:50 pm

Re: Error in computing likelihood for initial parameter valu

Postby rwhitt01 » Mon Mar 30, 2015 10:21 am

Hello,

Here is the data file I am using.

Regards,
Richard
Attachments
data.mat.zip
Data
(1.43 KiB) Downloaded 207 times
rwhitt01
 
Posts: 23
Joined: Tue Nov 11, 2014 5:50 pm

initial parameter values- Update Code

Postby rwhitt01 » Mon Mar 30, 2015 4:17 pm

Hello,

I have read more of the forums to try to solve my problem, and modified the original code to match some of these posting. But, I am still not able to get it to work. Any help would be appreciated.

Regards,
Richard


>> dynare wm3

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
Found 18 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.





Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0



EIGENVALUES:
Modulus Real Imaginary

0.4093 0.4093 0
0.9 0.9 0
0.9 0.9 0
1 1 0
1 1 0
1 1 0
1.005 1.003 0.0588
1.005 1.003 -0.0588
2.468 2.468 0
Inf -Inf 0


There are 4 eigenvalue(s) larger than 1 in modulus
for 4 forward-looking variable(s)

The rank condition is verified.


You did not declare endogenous variables after the estimation/calib_smoother command.

Loading 180 observations from data.mat

Restricting the sample to observations 5 to 180. Using in total 176 observations.
Warning: Matrix is singular to working precision.
> In lyapunov_symm at 145
In dsge_likelihood at 374
In initial_estimation_checks at 47
In dynare_estimation_1 at 179
In dynare_estimation at 89
In wm3 at 255
In dynare at 180
Warning: Matrix is singular to working precision.
> In kalman_filter at 182
In dsge_likelihood at 646
In initial_estimation_checks at 47
In dynare_estimation_1 at 179
In dynare_estimation at 89
In wm3 at 255
In dynare at 180
Error in computing likelihood for initial parameter values

ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
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 print_info (line 98)
Likelihood is not a number (NaN) or a complex number

Error in print_info (line 98)
error('Likelihood is not a number (NaN) or a complex number');

Error in initial_estimation_checks (line 69)
print_info(info, DynareOptions.noprint, DynareOptions)

Error in dynare_estimation_1 (line 179)
oo_ = initial_estimation_checks(objective_function,xparam1,dataset_,M_,estim_params_,options_,bayestopt_,oo_);

Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);

Error in wm3 (line 255)
dynare_estimation(var_list_);

Error in dynare (line 180)
evalin('base',fname) ;
Attachments
wm3.mod
(5.4 KiB) Downloaded 106 times
rwhitt01
 
Posts: 23
Joined: Tue Nov 11, 2014 5:50 pm

Re: Error in computing likelihood for initial parameter valu

Postby jpfeifer » Thu Apr 02, 2015 9:48 am

There are several issues. A general one is that you are not taking the parameter dependence in steady state into account. Please take a look at Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf. You are performing a fundamental mistake by having lambda depend on estimated parameters and not using either model local variables or a steady_state_model-block to update lambda when beta changes.

Moreover, your data and the model are inconsistent. The model assumes a zero inflation steady state while your CPI is ever increasing. Use demeaned growth rates for the CPI as your observed variable. Again, refer to my Guide to Observation equations.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Error in computing likelihood for initial parameter valu

Postby chiara.punzo » Thu Feb 04, 2016 6:45 pm

Debt_financed_Gali_agent.mod
BE file
(5.07 KiB) Downloaded 79 times
Hello,
I have the same kind of error.
Could you help me? Maybe, could I try to change some parameters?
But, what? And, how much? Is there a command to have this kind of answers?

Or, Would it be better to increase the number of observed variables (increasing also the number of shocks)?

Thank you so much,
Regards,
Chiara
chiara.punzo
 
Posts: 2
Joined: Thu Feb 04, 2016 5:46 pm

Re: Error in computing likelihood for initial parameter valu

Postby jpfeifer » Mon Feb 08, 2016 6:43 am

Sorry, but the data file is missing.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Error in computing likelihood for initial parameter valu

Postby chiara.punzo » Mon Feb 15, 2016 10:29 pm

Sorry, I upload immediately.
I have cleaned SMETS & WOUTERS data (2007) according to my single observable variable.
Attachments
usmodel_data.xls
(32 KiB) Downloaded 122 times
chiara.punzo
 
Posts: 2
Joined: Thu Feb 04, 2016 5:46 pm

Re: Error in computing likelihood for initial parameter valu

Postby jpfeifer » Sat Feb 20, 2016 8:08 am

There must be a timing error in your model. Please put
Code: Select all
check;

after the shocks-block and then try to find the mistake that makes the indeterminacy problem in the calibrated model go away.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 11 guests