Problems with Identification Analysis

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.

Problems with Identification Analysis

Postby Econbee » Fri Aug 08, 2014 5:12 pm

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)
[x,FVAL,JACOB,EXITFLAG,OUTPUT,msgData]=...
Error in Experiment_steadystate (line 55)
[ld_ss,Fval,exitflag] = fsolve(@(x)LHS-varpsi*PIstarw_ss^(-eta*gamma_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)
dynare_identification(options_ident);
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?

2. 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!!!
Attachments
Experiment_Identification_Dynare.zip
(45.84 KiB) Downloaded 92 times
Econbee
 
Posts: 74
Joined: Fri Nov 08, 2013 8:14 am

Re: Problems with Identification Analysis

Postby jpfeifer » Thu Aug 14, 2014 6:54 am

Sorry, but I cannot open the file you attached.
------------
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: Problems with Identification Analysis

Postby Econbee » Thu Aug 14, 2014 7:17 am

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

Thank you!
Attachments
Experiment_Identification_Dynare.rar
(45.48 KiB) Downloaded 129 times
Econbee
 
Posts: 74
Joined: Fri Nov 08, 2013 8:14 am

Re: Problems with Identification Analysis

Postby jpfeifer » Thu Aug 14, 2014 8:55 am

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.
Attachments
dynare_estimation_init.m
Bugfixed file for 4.4.3
(21.05 KiB) Downloaded 141 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: Problems with Identification Analysis

Postby Econbee » Thu Aug 14, 2014 12:47 pm

Thank you so much for the reply and the attached file, jpfeifer!
Econbee
 
Posts: 74
Joined: Fri Nov 08, 2013 8:14 am

Re: Problems with Identification Analysis

Postby Econbee » Sat Aug 16, 2014 7:32 am

Dear Johannes,

I have a few questions for you:

1. Related to the problem in the previous post on July 21 (viewtopic.php?f=1&t=5866), 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)
dynare_estimation_1(var_list,dname);

Error in Experiment (line 544)
dynare_estimation(var_list_);

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?

3. 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:
tau
kappa
r_Q
PI_Q
gamma_Q
rho_d
rho_g
rho_z
sigma_d
sigma_g
sigma_z
sigma_R
rho_R
psi_R_PI
psi_R_y
betta
gamma_ss
r_ss
PI_ss
R_ss
omega_ss
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!
Attachments
dynare_estimation_init.m
(22.72 KiB) Downloaded 93 times
dynare_estimation_1.m
(49.04 KiB) Downloaded 85 times
Econbee
 
Posts: 74
Joined: Fri Nov 08, 2013 8:14 am

Re: Problems with Identification Analysis

Postby jpfeifer » Mon Aug 18, 2014 8:06 am

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 https://github.com/DynareTeam/dynare/pull/698. 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)
------------
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: Problems with Identification Analysis

Postby Econbee » Mon Aug 18, 2014 3:49 pm

Thanks for your clarifications, dear Johannes!
Econbee
 
Posts: 74
Joined: Fri Nov 08, 2013 8:14 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests

cron