Identification failure

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.

Identification failure

Postby Grant » Tue Jul 22, 2014 3:05 pm

Dear,

When I try to use the identification command, I got the following message:
==== Identification analysis ====

Testing prior mean

-----------
Parameter error:
The model does not solve for prior_mean with error code info = 3

info==3 %! Blanchard & Kahn conditions are not satisfied: no stable equilibrium.
-----------

Try sampling up to 50 parameter sets from the prior.

==== Identification analysis completed ====

Dose it mean that my prior is poor or my model has some mis-specification? How to solve this problem?

Any help is highly appreciated. Here attached my code and data file.

Thanks!
Attachments
paper_data.xls
(35.5 KiB) Downloaded 211 times
code.mod
(10.14 KiB) Downloaded 210 times
Grant
 
Posts: 95
Joined: Tue Jun 10, 2014 2:37 pm

Re: Identification failure

Postby jpfeifer » Wed Jul 23, 2014 10:17 am

There is a bug here that prevents displaying the results. They would be:

Code: Select all
All parameters are identified in the model (rank of H).


WARNING !!!
The rank of J (moments) is deficient!


    [rho_y,epsyf] are PAIRWISE collinear (with tol = 1.e-10) !

The bug will be fixed soon.
------------
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: Identification failure

Postby Grant » Wed Jul 23, 2014 1:10 pm

Dear Jpfeifer:

Thanks for your help.

How can I fix this identification problem? If I calibrated the parameter rho_y or remove the parameter epsyf though modifying my model, can I fix it?

Regards,
Grant
 
Posts: 95
Joined: Tue Jun 10, 2014 2:37 pm

Re: Identification failure

Postby jpfeifer » Wed Jul 23, 2014 1:20 pm

Tomorrow's unstable version will have fixed the bug, so you can check what you are doing. My guess is that fixing one of the two parameters should solve the problem.
------------
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: Identification failure

Postby Grant » Thu Jul 24, 2014 3:54 pm

Dear Jpfeifer,

Thanks for your answer.

I have tried the latest unstable dynare and calibrated the corresponding parameters. However, I got the following message:

==== Identification analysis ====

Testing prior mean

-----------
Parameter error:
The model does not solve for prior_mean with error code info = 3

info==3 %! Blanchard & Kahn conditions are not satisfied: no stable equilibrium.
-----------

Try sampling up to 50 parameter sets from the prior.
Evaluating simulated moment uncertainty ... please wait
Doing 1143 replicas of length 300 periods.
Simulated moment uncertainty ... done!

All parameters are identified in the model (rank of H).


All parameters are identified by J moments (rank of J)


==== Identification analysis completed ====

I am confused about the identification result. It shows that all parameters are identified, while it also tells that Blanchard & Kahn conditions are not satisfied: no stable equilibrium. Could you tell me whether all the parameters are identified or not? And what is the meaning of the identification result?

Here attached my newly code and data.

Regards,
Attachments
mydata.xls
(35 KiB) Downloaded 191 times
code.mod
(9.83 KiB) Downloaded 232 times
Grant
 
Posts: 95
Joined: Tue Jun 10, 2014 2:37 pm

Re: Identification failure

Postby jpfeifer » Thu Jul 24, 2014 4:25 pm

The model does not solve for the prior mean. Thus the message about BK. What Dynare then does is sample from the prior. Given the draws from the prior for which the model solves, identification is checked. In your case, no problems are detected at this stage. All parameters are identified now.
------------
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: Identification failure

Postby Grant » Fri Jul 25, 2014 1:42 am

Dear Jpfeifer,

I worry about the identification problem a lot, now your answer make me clear about that there is no problem detected. Many thanks for your answer, which is a great help for my paper indeed.

Best regards,
Grant
 
Posts: 95
Joined: Tue Jun 10, 2014 2:37 pm

Re: Identification failure

Postby Grant » Fri Jul 25, 2014 9:59 am

Dear Jpfeifer,

I found another problem now. Although there is no problem about identification now, dynare shows that

ESTIMATION RESULTS

Log data density is 1298.870607.
posterior_moments: There are not enough draws computes to compute HPD Intervals. Skipping their computation.
posterior_moments: There are not enough draws computes to compute deciles. Skipping their computation.

I set mh_replic=50000 in the estimation command block. What is the meaning of the above message? Is it a problem?

Regards,
Grant
 
Posts: 95
Joined: Tue Jun 10, 2014 2:37 pm

Re: Identification failure

Postby jpfeifer » Mon Jul 28, 2014 7:31 am

I need more details. When does this message occur? Note also that running identification before estimation is not recommended. There are still some incompatibilities. Please test identification and if that is done, comment this part of the code out and then run estimation.
------------
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: Identification failure

Postby Grant » Sat Aug 09, 2014 7:16 am

Dear Jpfeifer,

This message just occurred in the log file as the following:

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
Substitution of endo lags >= 2: added 39 auxiliary variables and equations.
Found 95 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
- order 2
- derivatives of Jacobian/Hessian w.r. to parameters
Computing dynamic model derivatives:
- order 1
- order 2
- derivatives of Jacobian/Hessian w.r. to parameters
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.

EIGENVALUES:
Modulus Real Imaginary

0 0 0
0 0 0
0 0 0
0 -0 0
5.313e-140 -5.313e-140 0
2.653e-136 -2.653e-136 0
6.723e-102 6.723e-102 0
1.669e-101 1.669e-101 0
4.56e-100 -4.56e-100 0
1.342e-73 1.342e-73 0
2.696e-70 -2.696e-70 0
2.69e-66 -2.69e-66 0
2.808e-64 2.808e-64 0
7.297e-48 7.297e-48 0
5.153e-26 -5.153e-26 0
6.398e-22 -6.398e-22 0
7.813e-22 7.813e-22 0
8.759e-22 -8.759e-22 0
5.698e-21 -5.698e-21 0
1.162e-20 -1.162e-20 0
1.349e-20 -1.349e-20 0
1.503e-20 -1.503e-20 0
2.123e-20 2.123e-20 0
2.156e-20 -2.156e-20 0
2.171e-20 -2.171e-20 0
2.672e-20 -2.672e-20 0
3.07e-20 -3.07e-20 0
9.349e-20 -9.349e-20 0
1.477e-19 1.477e-19 0
2.18e-19 -2.18e-19 0
2.519e-19 2.519e-19 0
2.85e-19 2.85e-19 0
5.173e-19 5.173e-19 0
8.873e-19 -8.873e-19 0
9.439e-19 9.439e-19 0
9.575e-19 -9.575e-19 0
1.049e-18 -1.049e-18 0
1.069e-18 -1.069e-18 0
6.391e-18 -6.391e-18 0
6.84e-18 -6.84e-18 0
7.137e-18 -7.137e-18 0
9.412e-18 -9.412e-18 0
1.507e-17 1.507e-17 0
1.776e-17 1.776e-17 0
2.053e-17 2.053e-17 0
2.244e-17 -2.244e-17 0
2.699e-17 2.699e-17 0
2.734e-17 2.734e-17 0
3.675e-17 3.675e-17 0
3.678e-17 3.678e-17 0
6.471e-17 -6.471e-17 0
6.716e-17 -6.716e-17 0
3.395e-16 -3.395e-16 0
1.302e-15 1.302e-15 0
4.638e-07 -7.262e-14 4.638e-07
4.638e-07 -7.262e-14 -4.638e-07
0.111 0.111 0
0.2 0.2 0
0.3985 0.3985 0
0.7 0.7 0
0.7 0.7 0
0.7 0.7 0
0.7 0.7 0
0.7 0.7 0
0.7 0.7 0
0.7 0.7 0
0.7 0.7 0
0.7 0.7 0
0.85 0.85 0
0.85 0.85 0
0.9 0.9 0
0.9 0.9 0
0.9881 0.9881 0
0.99 0.99 0
1.01 1.01 0
1.024 1.024 0
1.15 1.15 0
1.856e+17 -1.856e+17 0
3.474e+17 -3.474e+17 0
8.33e+17 -8.33e+17 0
9.253e+18 9.253e+18 0
Inf Inf 0
Inf Inf 0


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

The rank condition is verified.


STEADY-STATE RESULTS:

y 0
pi_d_h 0
pi_c 0
r 0
c 0
n 0
d 0
d_b 0
d_s 0
b_b 0
p_dc 0
c_b 0
c_s 0
psi 0
pi_c_h 0
s_c 0
s_d 0
y_c 0
y_d 0
mc_c 0
mc_d 0
n_c 0
n_d 0
wp_d 0
wp_c 0
n_c_b 0
n_d_b 0
n_c_s 0
n_d_s 0
i_d 0
yf 0
a_c 0
a_d 0
shock_mu_c 0
shock_mu_d 0
LTV 0
shock_d_b 0
shock_d_s 0
shock_d_stern 0
c_ast 0
d_ast 0
i_d_ast 0
pi_c_f 0
epsa_c4aux 0
epsa_d4aux 0
epsmu_c4aux 0
epsmu_d4aux 0
epsLTV4aux 0
epsd_b4aux 0
epsd_s4aux 0
epsd_stern4aux 0
epsc_ast4aux 0
epsd_ast4aux 0
epss_c4aux 0
epss_d4aux 0
epsr4aux 0

Loading 116 observations from model_data.xlsx

Initial value of the log posterior (or likelihood): 1728.4031

==========================================================
Change in the covariance matrix = 0.073246.
Mode improvement = 36.1753
New value of jscale = 0.25109
==========================================================

==========================================================
Change in the covariance matrix = 0.26596.
Mode improvement = 8.2298
New value of jscale = 0.25228
==========================================================

==========================================================
Change in the covariance matrix = 0.11111.
Mode improvement = 31.53
New value of jscale = 0.195
==========================================================

Optimal value of the scale parameter = 0.195

Final value of the log posterior (or likelihood): -1804.3383


RESULTS FROM POSTERIOR ESTIMATION
parameters
prior mean mode s.d. prior pstdev

rho_a_c 0.300 0.0547 0.0600 beta 0.2000
rho_a_d 0.300 0.4061 0.0871 beta 0.2000
rho_mu_c 0.300 0.2572 0.0786 beta 0.2000
rho_mu_d 0.300 0.6776 0.0525 beta 0.2000
rho_LTV 0.300 0.1200 0.1445 beta 0.2000
rho_d_b 0.300 0.2892 0.0960 beta 0.2000
rho_d_s 0.300 0.2304 0.0785 beta 0.2000
rho_d_stern 0.300 0.4346 0.1263 beta 0.2000
rho_c_ast 0.300 0.7683 0.0646 beta 0.2000
rho_d_ast 0.300 0.5551 0.0900 beta 0.2000
rho_s_c 0.300 0.1936 0.0701 beta 0.2000
rho_s_d 0.300 0.7098 0.0673 beta 0.2000
rho_r 0.300 0.4372 0.0449 beta 0.2000
theta_d 0.300 0.1605 0.0480 beta 0.1500
theta_c 0.750 0.3263 0.0371 beta 0.1500
sigma 1.000 1.6343 0.0676 gamm 0.7000
phi 3.000 4.1001 0.7053 gamm 2.0000
omega 0.200 0.0555 0.0363 beta 0.1000
h_c 0.500 0.0423 0.0239 beta 0.2000
gamma 0.500 0.2273 0.0219 beta 0.2000
alpha_c 0.500 0.2236 0.0258 beta 0.1000
alpha_d 0.500 0.3419 0.0432 beta 0.1000

standard deviation of shocks
prior mean mode s.d. prior pstdev

epsa_c 0.100 0.0166 0.0018 invg 2.0000
epsa_d 0.100 0.0468 0.0128 invg 2.0000
epsmu_c 0.100 0.0367 0.0122 invg 2.0000
epsmu_d 0.100 0.0442 0.0591 invg 2.0000
epsLTV 0.100 0.0461 0.0449 invg 2.0000
epsd_b 0.100 0.0466 0.0346 invg 2.0000
epsd_s 0.100 0.0253 0.0060 invg 2.0000
epsc_ast 0.100 0.0142 0.0014 invg 2.0000
epsd_ast 0.100 0.0463 0.0469 invg 2.0000
epsd_stern 0.100 0.0286 0.0056 invg 2.0000
epss_c 0.100 0.0138 0.0013 invg 2.0000
epss_d 0.100 0.0469 0.0315 invg 2.0000
epsr 0.100 0.0130 0.0009 invg 2.0000
epsyf 0.100 0.0166 0.0018 invg 2.0000
epsa_c4 0.100 0.0168 0.0018 invg 2.0000
epsa_d4 0.100 0.0436 0.0127 invg 2.0000
epsmu_c4 0.100 0.0393 0.0116 invg 2.0000
epsmu_d4 0.100 0.0462 0.0408 invg 2.0000
epsLTV4 0.100 0.0454 0.0571 invg 2.0000
epsd_b4 0.100 0.0461 0.0222 invg 2.0000
epsd_s4 0.100 0.0233 0.0039 invg 2.0000
epsc_ast4 0.100 0.0118 0.0008 invg 2.0000
epsd_ast4 0.100 0.0465 0.0465 invg 2.0000
epsd_stern4 0.100 0.0258 0.0052 invg 2.0000
epss_c4 0.100 0.0142 0.0014 invg 2.0000
epss_d4 0.100 0.0772 0.0315 invg 2.0000
epsr4 0.100 0.0122 0.0009 invg 2.0000


Log data density [Laplace approximation] is 1637.125144.

Estimation::mcmc: Multiple chains mode.
Estimation::mcmc: Searching for initial values...
Estimation::mcmc: Initial values found!

Estimation::mcmc: Write details about the MCMC... Ok!
Estimation::mcmc: Details about the MCMC are available in code/metropolis\code_mh_history_0.mat


Estimation::mcmc: Number of mh files: 21 per block.
Estimation::mcmc: Total number of generated files: 42.
Estimation::mcmc: Total number of iterations: 50000.
Estimation::mcmc: Current acceptance ratio per chain:
Chain 1: 36.0933%
Chain 2: 35.0773%
Estimation::mcmc::diagnostics: Univariate convergence diagnostic, Brooks and Gelman (1998):
Parameter 1... Done!
Parameter 2... Done!
Parameter 3... Done!
Parameter 4... Done!
Parameter 5... Done!
Parameter 6... Done!
Parameter 7... Done!
Parameter 8... Done!
Parameter 9... Done!
Parameter 10... Done!
Parameter 11... Done!
Parameter 12... Done!
Parameter 13... Done!
Parameter 14... Done!
Parameter 15... Done!
Parameter 16... Done!
Parameter 17... Done!
Parameter 18... Done!
Parameter 19... Done!
Parameter 20... Done!
Parameter 21... Done!
Parameter 22... Done!
Parameter 23... Done!
Parameter 24... Done!
Parameter 25... Done!
Parameter 26... Done!
Parameter 27... Done!
Parameter 28... Done!
Parameter 29... Done!
Parameter 30... Done!
Parameter 31... Done!
Parameter 32... Done!
Parameter 33... Done!
Parameter 34... Done!
Parameter 35... Done!
Parameter 36... Done!
Parameter 37... Done!
Parameter 38... Done!
Parameter 39... Done!
Parameter 40... Done!
Parameter 41... Done!
Parameter 42... Done!
Parameter 43... Done!
Parameter 44... Done!
Parameter 45... Done!
Parameter 46... Done!
Parameter 47... Done!
Parameter 48... Done!
Parameter 49... Done!

Estimation::mcmc: Total number of MH draws: 50000.
Estimation::mcmc: Total number of generated MH files: 21.
Estimation::mcmc: I'll use mh-files 11 to 21.
Estimation::mcmc: In MH-file number 11 I'll start at line 490.
Estimation::mcmc: Finally I keep 25000 draws.

Estimation::marginal density: I'm computing the posterior mean and covariance... Done!
Estimation::marginal density: I'm computing the posterior log marginal density (modified harmonic mean)... Done!


ESTIMATION RESULTS

Log data density is 1647.787878.
posterior_moments: There are not enough draws computes to compute HPD Intervals. Skipping their computation.
posterior_moments: There are not enough draws computes to compute deciles. Skipping their computation.

parameters
prior mean post. mean 90% HPD interval prior pstdev

rho_a_c 0.300 0.0968 0.0010 0.1863 beta 0.2000
rho_a_d 0.300 0.3806 0.1801 0.5664 beta 0.2000
rho_mu_c 0.300 0.1259 0.0011 0.2249 beta 0.2000
rho_mu_d 0.300 0.7382 0.5848 0.8974 beta 0.2000
rho_LTV 0.300 0.3600 0.0309 0.6405 beta 0.2000
rho_d_b 0.300 0.4441 0.0466 0.7779 beta 0.2000
rho_d_s 0.300 0.2308 0.0162 0.4508 beta 0.2000
rho_d_stern 0.300 0.6448 0.3963 0.8764 beta 0.2000
rho_c_ast 0.300 0.7702 0.6929 0.8463 beta 0.2000
rho_d_ast 0.300 0.5931 0.3709 0.8202 beta 0.2000
rho_s_c 0.300 0.2480 0.0395 0.4582 beta 0.2000
rho_s_d 0.300 0.7325 0.6064 0.8725 beta 0.2000
rho_r 0.300 0.3938 0.2801 0.5045 beta 0.2000
theta_d 0.300 0.1775 0.0505 0.2830 beta 0.1500
theta_c 0.750 0.3076 0.2293 0.3815 beta 0.1500
sigma 1.000 1.6219 1.5016 1.7272 gamma 0.7000
phi 3.000 5.0113 3.5626 6.3631 gamma 2.0000
omega 0.200 0.0775 0.0149 0.1354 beta 0.1000
h_c 0.500 0.0609 0.0087 0.1081 beta 0.2000
gamma 0.500 0.2403 0.2043 0.2768 beta 0.2000
alpha_c 0.500 0.2110 0.1609 0.2577 beta 0.1000
alpha_d 0.500 0.2923 0.2174 0.3682 beta 0.1000

standard deviation of shocks
prior mean post. mean 90% HPD interval prior pstdev

epsa_c 0.100 0.0168 0.0141 0.0196 invg 2.0000
epsa_d 0.100 0.0484 0.0289 0.0659 invg 2.0000
epsmu_c 0.100 0.0502 0.0243 0.0785 invg 2.0000
epsmu_d 0.100 0.0654 0.0253 0.1118 invg 2.0000
epsLTV 0.100 0.0852 0.0221 0.1644 invg 2.0000
epsd_b 0.100 0.0942 0.0241 0.1808 invg 2.0000
epsd_s 0.100 0.0275 0.0195 0.0355 invg 2.0000
epsc_ast 0.100 0.0150 0.0126 0.0173 invg 2.0000
epsd_ast 0.100 0.0782 0.0248 0.1345 invg 2.0000
epsd_stern 0.100 0.0350 0.0228 0.0481 invg 2.0000
epss_c 0.100 0.0142 0.0120 0.0161 invg 2.0000
epss_d 0.100 0.0657 0.0269 0.1060 invg 2.0000
epsr 0.100 0.0138 0.0118 0.0157 invg 2.0000
epsyf 0.100 0.0170 0.0141 0.0201 invg 2.0000
epsa_c4 0.100 0.0173 0.0142 0.0201 invg 2.0000
epsa_d4 0.100 0.0465 0.0264 0.0659 invg 2.0000
epsmu_c4 0.100 0.0538 0.0265 0.0844 invg 2.0000
epsmu_d4 0.100 0.0748 0.0234 0.1317 invg 2.0000
epsLTV4 0.100 0.0942 0.0219 0.2085 invg 2.0000
epsd_b4 0.100 0.0690 0.0264 0.1205 invg 2.0000
epsd_s4 0.100 0.0242 0.0185 0.0302 invg 2.0000
epsc_ast4 0.100 0.0125 0.0118 0.0134 invg 2.0000
epsd_ast4 0.100 0.0771 0.0228 0.1371 invg 2.0000
epsd_stern4 0.100 0.0276 0.0196 0.0355 invg 2.0000
epss_c4 0.100 0.0146 0.0121 0.0168 invg 2.0000
epss_d4 0.100 0.0781 0.0364 0.1133 invg 2.0000
epsr4 0.100 0.0132 0.0118 0.0144 invg 2.0000
Estimation::mcmc: Posterior (dsge) IRFs...
Estimation::mcmc: Posterior IRFs, done!

Loading 116 observations from model_data.xlsx


==== Identification analysis ====

Testing prior mean

-----------
Parameter error:
The model does not solve for prior_mean with error code info = 3

info==3 %! Blanchard & Kahn conditions are not satisfied: no stable equilibrium.
-----------

Try sampling up to 50 parameter sets from the prior.

All parameters are identified in the model (rank of H).


All parameters are identified by J moments (rank of J)


==== Identification analysis completed ====


Total computing time : 2h59m16s
Note: warning(s) encountered in MATLAB/Octave code


I just set the identification command at the end of my code.

Regards,
Grant
 
Posts: 95
Joined: Tue Jun 10, 2014 2:37 pm

Re: Identification failure

Postby jpfeifer » Sat Aug 09, 2014 8:30 am

This is a bug that leads to a wrong display of the warning. The statistics should still be computed correctly. Replace the 4.4.3 file with the attached one and it should not display the wrong warning.
Attachments
GetPosteriorParametersStatistics.m
(16.93 KiB) Downloaded 354 times
------------
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: Identification failure

Postby Enthusiast » Mon Apr 13, 2015 4:19 pm

Does this bug still exist? I get a very similar error message about HPD intervals and declines. Is it my fault or could there be a bug?
Enthusiast
 
Posts: 15
Joined: Sat Nov 08, 2014 10:52 pm

Re: Identification failure

Postby jpfeifer » Mon Apr 13, 2015 4:36 pm

Bugfixes only affect new versions going forward. In the unstable version, this has been fixed. For Dynare 4.4.3 you must use the above file. Note that this only affects the message printed on the screen. All computations should be there. Thus, check whether oo_ contains the posterior moments. If not report back.
------------
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: Identification failure

Postby Seungcheol Lee » Tue Aug 04, 2015 6:13 pm

Hello

I replaced the "GetPosteriorParametersStatistics.m" file and I found that the error message didn't appear any more.

But oo_ doesn't contain the posterior moments.

Do I have to use more replication than mh_replic=20000 ?

Thank you

Best
Seungcheol
Attachments
data_DNKWO.m
(3.15 KiB) Downloaded 164 times
D_infe_NK2WO.mod
(4.04 KiB) Downloaded 184 times
Seungcheol Lee
 
Posts: 14
Joined: Mon Jun 29, 2015 10:17 am

Re: Identification failure

Postby jpfeifer » Thu Aug 06, 2015 9:10 am

You did not request
Code: Select all
moments_varendo
------------
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

Next

Return to Dynare help

Who is online

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