Problems with Identification Analysis

Dear All,

I recently had some problems with identification analysis in Dynare. Hopefully I could get some suggestions or comments from you.

I basically have the following two questions. For your reference, the required files are in the attached zip file.

  1. When I estimate my model first with mode_file option and then trigger the identification analysis, everything works fine. According to my understanding, in this case, the point-estimate identification is based on the prior mean. So the estimation stage in fact does not matter at all for the identificaiton. Then I try to run the identification analysis without estimation, I got the following error message:

Error using trustnleqn (line 28)
Objective function is returning undefined values at initial point. FSOLVE cannot continue.
Error in fsolve (line 376)
Error in Experiment_steadystate (line 55)
[ld_ss,Fval,exitflag] = fsolve(@(x)LHS-varpsiPIstarw_ss^(-etagamma_l)*x^gamma_l/…
Error in evaluate_steady_state_file (line 49)
[ys,check] = h_steadystate(ys_init, exo_ss);
Error in evaluate_steady_state (line 58)
[ys,params,info] = evaluate_steady_state_file(ys_init,exo_ss,M, …
Error in dynare_estimation_init (line 463)
[tmp1, params] = evaluate_steady_state(oo_.steady_state,M,options_,oo_,steadystate_check_flag);
Error in dynare_identification (line 131)
[dataset_,dataset_info,xparam1,hh, M_, options_, oo_, estim_params_,bayestopt_]=dynare_estimation_init(M_.endo_names,fname_,1, M_, options_, oo_,
estim_params_, bayestopt_);
Error in Experiment (line 532)
Error in dynare (line 185)
evalin(‘base’,fname) ;

In my understanding, if I run the identification without estimation, prior mean should be used as default. But I got the above error, which is very confusing. To get better understanding, I then tried to include initial values of the paramters in the estimated_para block (line 297 to 331). This time, I still got the above error message. I don’t know if I have done anything wrong or is it a bug in Dynare?

  1. After I run my mod file with estimation and identification, I found my model has very big identification problem. This can be seen from the log file. If you run the mod file with estimation, the figures for identification analysis provide further evidence for identification problem. I am very confused. My model basically follows the literature except that I add one equation linking money growth rate with inflation, real money balance. It is an identity without parameters in the equation. Even though this is not usually included in the standard literature, it is always there implicitly implied in my model. I am wondering if this is going to impose important restrictions so that the identification crashes totally. How should I proceed to handle the problem?

Thanks a lot!!! (45.8 KB)

Sorry, but I cannot open the file you attached.

Sorry! Please check the attached file. Also please ignore my second question in the previous post.

Thank you!
Experiment_Identification_Dynare.rar (45.5 KB)

This is a bug related to the fact that identification uses analytic derivatives when not preceeded by estimation. But in your case the steady state file changes parameters and thus requires numerical derivatives. When implementing this check, a line of code was forgotten, resulting in the crash. Thanks for reporting. A bugfixed file is attached.
dynare_estimation_init.m (21 KB)

Thank you so much for the reply and the attached file, jpfeifer!

Dear Johannes,

I have a few questions for you:

  1. Related to the problem in the previous post on July 21 (A question on mode_file option in Dynare), have the two files (dynare_estimation_1.m and dynare_estimation_init.m) been updated in version 4.4.3 or the latest unstable version of Dynare? I am asking because everytime I update Dynare, I have to copy the files you sent me on July 21 (which are attached) and then paste them in the installed folder to make sure the two files are good. This brought a lot of inconvenience.

  2. Also related to the first question. I installed Dynare unstable version 2014-08-15. Without replacing the two files (dynare_estimation_1.m and dynare_estimation_init.m), I found that I could do identification analysis without estimation before it. And everything was fine. When I replace dynare_estimation_init.m with the one you provided on Aug 14 in this post, I got the following error message:

Error using union>unionR2012a (line 320)
Inputs A and B must be matrices with the same number of columns in the ‘rows’ case.

Error in union (line 142)
[varargout{1:nlhs}] = unionR2012a(varargin{1:2},logical(flaginds(1:3)));

Error in dynare_estimation_init (line 347)
k2 = union(var_obs_index,[M_.nstatic+1:M_.nstatic+M_.nspred]’, ‘rows’);

Error in dynare_estimation_1 (line 81)
[dataset_,dataset_info, xparam1, hh, M_, options_, oo_, estim_params_, bayestopt_] = …

Error in dynare_estimation (line 89)

Error in Experiment (line 544)

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

I am just wondering what is happening. Does it mean there is still some bugs in dynare_estimation_init.m you sent me on Aug 14 and the bugs have been corrected so dynare_estimation_init.m in the latest version is good? Also, do I still need to replace dynare_estimation_1.m and dynare_estimation_init.m in unstable version 2014-08-15 with the files you sent me on July 21?

  1. When I do identification analysis directly (without estimation), I got the following message at the beginning:

The steadystate file changed the values for the following parameters:
The derivatives of jacobian and steady-state will be computed numerically

What does this message mean? Does this affect my result? I guess this might not hurt. Please give me some clarification.

Thank you very much!
dynare_estimation_init.m (22.7 KB)
dynare_estimation_1.m (49 KB)

  1. The bugfix files were for Dynare 4.4.3 and do not work with the unstable version. As of my writing, the issue still has status “open”, see Hence, it has not been fixed in the unstable version. Dynare 4.4.3 will not be fixed at all. If the bug is fixed, it will be available in 4.4.4.

  2. As long as you do identification analysis without estimation before it, you can just use the unstable version as is.

  3. The message means that no analytical derivatives can be computed for the likelihood function (which identification uses by default), because your steady state file updates parameters. In this case, numerical differentiation is used. While this may introduce small numerical inaccuracies, it is usually no reason to worry (and it is the only way to proceed in your case)

Thanks for your clarifications, dear Johannes!