code error

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.

code error

Postby Grant » Tue Jul 04, 2017 1:46 pm

Dear Pfeifer,

My code can run and do the estimation, but when it almost comes to the end, it runs into the following error:

Estimation::compute_moments_varendo: I'm computing endogenous moments (this may take a while)... Subscript indices must either be real positive integers or logicals.

Error in kernel_density_estimate (line 82)
xi(indx+[1 2]) = xi(indx+[1 2]) + [1-temp,temp]';

Error in posterior_moments (line 91)
[density(:,1),density(:,2)] = kernel_density_estimate(xx,number_of_grid_points,...

Error in covariance_mc_analysis (line 113)
posterior_moments(tmp,1,mh_conf_sig);

Error in posterior_analysis>job (line 57)
oo_ = covariance_mc_analysis(SampleSize,'posterior',M_.dname,M_.fname,...

Error in posterior_analysis (line 38)
oo_ = job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_,nvar,vartan);

Error in compute_moments_varendo (line 77)
oo_ = posterior_analysis('variance',var_list_(i,:),var_list_(j,:),[],options_,M_,oo_);

Error in dynare_estimation_1 (line 514)
oo_ = compute_moments_varendo('posterior',options_,M_,oo_,var_list_);

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

Error in code (line 964)
oo_recursive_=dynare_estimation(var_list_);

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

Here attached the code and data. Please help me check where the problem is. Thank you in advance!

I am looking forward to your reply.
Attachments
data100.xls
(37 KiB) Downloaded 58 times
code.mod
(9.89 KiB) Downloaded 66 times
Grant
 
Posts: 95
Joined: Tue Jun 10, 2014 2:37 pm

Re: code error

Postby jpfeifer » Tue Jul 04, 2017 3:54 pm

Which Dynare version are you using?
------------
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: code error

Postby Grant » Wed Jul 05, 2017 5:00 am

Dear Peifer:

I am using the latest stable version, Dynare 4.5.
Grant
 
Posts: 95
Joined: Tue Jun 10, 2014 2:37 pm

Re: code error

Postby jpfeifer » Wed Jul 05, 2017 7:39 pm

Thanks for reporting this bug. You can track the progress at https://github.com/DynareTeam/dynare/pull/1475
------------
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: code error

Postby Grant » Fri Jul 07, 2017 2:34 am

Dear Pfeifer,

Thanks for your help. Now the problem has been solved.
Grant
 
Posts: 95
Joined: Tue Jun 10, 2014 2:37 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests