What's this?

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.

What's this?

Postby sunrain » Fri Oct 12, 2012 4:35 am

Any one can help fix this?
"
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

Starting Dynare (version 4.2.0).
Starting preprocessing of the model file ...
ERROR: riksbankmodel1.mod:116.34: syntax error, unexpected ';'

??? Error using ==> dynare at 126
DYNARE: preprocessing failed
"

Lots thanks!
sunrain
 
Posts: 19
Joined: Tue Dec 11, 2007 8:46 am

Re: What's this?

Postby jpfeifer » Fri Oct 12, 2012 9:31 pm

It says there is a problem in line 116, column 34. Maybe there is a missing bracket.
------------
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: What's this?

Postby sunrain » Tue Oct 16, 2012 2:29 am

dear jpfeifer,

Yes, you are right. I fixed it.

Thank you very much indeed!

Lixin
sunrain
 
Posts: 19
Joined: Tue Dec 11, 2007 8:46 am

Re: What's this?

Postby sunrain » Tue Oct 16, 2012 2:35 am

Dear Jpfeifer,

Thanks a lot first.

When I run my code(riksbank model by Adolfson et al (2005), the following errors took place:
Starting Dynare ...
Starting preprocessing of the model file ...
65 equation(s) found
Processing derivation ...
Processing Order 1... done
Processing Order 2... done
Processing outputs ...
Preprocessing completed.
Starting Matlab computing ...

??? Error using ==> lnsrch1 at 53
Some element of Newton direction isn't finite. Jacobian maybe singular or there is a problem with initial values

Error in ==> solve1 at 126
[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});

Error in ==> dynare_solve at 110
[x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian_flag,varargin{:});

Error in ==> steady_ at 69
[oo_.steady_state,check] = dynare_solve([M_.fname '_static'],...

Error in ==> steady at 52
steady_;

Error in ==> riksbankmodel1 at 736
steady;

Error in ==> dynare at 102
evalin('base',fname) ;

Could you give me some advice?

Thanks!

Lixin
sunrain
 
Posts: 19
Joined: Tue Dec 11, 2007 8:46 am

Re: What's this?

Postby jpfeifer » Fri Oct 19, 2012 2:17 pm

Enter the steady state manually. And check for errors in the code.
------------
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: What's this?

Postby sunrain » Sat Oct 20, 2012 8:50 am

jpfeifer wrote:Enter the steady state manually. And check for errors in the code.


Dear Jpferier,

Thanks!
I did enter the steady state annually, but how to check the error?
The code is attached. Please give me some advice!

Thank you very much indeed!

Best

Lixin
Attachments
Riksbankmodel1try.mod
(14.85 KiB) Downloaded 115 times
sunrain
 
Posts: 19
Joined: Tue Dec 11, 2007 8:46 am

Re: What's this?

Postby jpfeifer » Sat Oct 20, 2012 10:07 pm

But with the posted model, Dynare says
ERROR: There are 86 equations but 95 endogenous variables!
------------
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: What's this?

Postby donihue » Sun Oct 21, 2012 5:57 pm

As a follow-up to this, the following endogenous variables are not determined by the model's equations:
wbar, h, pid, pfaiz, v, gamf, rstar, ystar, pistar

Regards
Donihue
donihue
 
Posts: 34
Joined: Mon Sep 12, 2011 1:12 pm

Re: What's this?

Postby sunrain » Mon Oct 22, 2012 3:39 am

jpfeifer wrote:But with the posted model, Dynare says
ERROR: There are 86 equations but 95 endogenous variables!


Dear Jpfeifer,

Thanks. I got my problem.
Thank you very much indeed!

Best

Lixin
sunrain
 
Posts: 19
Joined: Tue Dec 11, 2007 8:46 am

Re: What's this?

Postby sunrain » Mon Oct 22, 2012 3:42 am

donihue wrote:As a follow-up to this, the following endogenous variables are not determined by the model's equations:
wbar, h, pid, pfaiz, v, gamf, rstar, ystar, pistar

Regards
Donihue


Dear Donihue,

Thanks for your kind help!
I will check my code in detail following up to your reminders.

Best

Lixin
sunrain
 
Posts: 19
Joined: Tue Dec 11, 2007 8:46 am

Re: What's this?

Postby sunrain » Tue Oct 23, 2012 2:51 am

Dear Jpferier,

Thanks for your help.
When I run another version of RIKSBANK Open DSGE model, I met the following errors:

"ERROR: ea_sr07try.mod:20.1-10: syntax error, unexpected PARAMETERS"

but all parameters are defined and used later?

Could you give me a hand?

P.S: "//Y=C+I;" is a comment or an equation?

Best

Lixin
sunrain
 
Posts: 19
Joined: Tue Dec 11, 2007 8:46 am

Re: What's this?

Postby jpfeifer » Tue Oct 23, 2012 7:11 am

The // indicates a parameter. Check if there is a semicolon at the end of line 19.
------------
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: What's this?

Postby sunrain » Tue Oct 23, 2012 8:40 am

jpfeifer wrote:The // indicates a parameter. Check if there is a semicolon at the end of line 19.


Dear Jpfeifer,

Thanks! I got it and fixed it.
Thank you very much indeed!

Best

Lixin
sunrain
 
Posts: 19
Joined: Tue Dec 11, 2007 8:46 am

Re: What's this?

Postby sunrain » Wed Oct 24, 2012 3:42 am

jpfeifer wrote:But with the posted model, Dynare says
ERROR: There are 86 equations but 95 endogenous variables!


Dear Jpfeifer,

Thanks for your help.
I modified my code and it met the condition. but another problem occured when I ran the code as:
"...

The rank condition is verified.

Improvement on iteration 43 = 0.000000000
improvement < crit termination
Objective function at mode: -1899.896983

POSTERIOR KERNEL OPTIMIZATION PROBLEM!
(minus) the hessian matrix at the "mode" is not positive definite!
=> posterior variance of the estimated parameters are not positive.
You should try to change the initial values of the parameters using
the estimated_params_init block, or use another optimization routine.
Warning: The results below are most likely wrong!
> In dynare_estimation_1 at 433
In dynare_estimation at 70
In riksbankdsgewithoutvartry at 979
In dynare at 120


Log data density [Laplace approximation] is 1636.059824.

Warning: BETAINV did not converge for a = 77.7331, b = 0.62688, p = 1.
> In betainv at 109
In prior_bounds at 85
In dynare_estimation_1 at 866
In dynare_estimation at 70
In riksbankdsgewithoutvartry at 979
In dynare at 120
Warning: File 'riksbankdsgewithoutvartry/metropolis' not found.
> In CheckPath at 41
In metropolis_hastings_initialization at 62
In random_walk_metropolis_hastings at 69
In dynare_estimation_1 at 884
In dynare_estimation at 70
In riksbankdsgewithoutvartry at 979
In dynare at 120
??? Error using ==> chol
Matrix must be positive definite.

Error in ==> metropolis_hastings_initialization at 68
d = chol(vv);

Error in ==> random_walk_metropolis_hastings at 69
[ ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck, nruns, NewFile, MAX_nruns, d ] = ...

Error in ==> dynare_estimation_1 at 884
feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_);

Error in ==> dynare_estimation at 70
dynare_estimation_1(var_list,dname);

Error in ==> riksbankdsgewithoutvartry at 979
dynare_estimation(var_list_);

Error in ==> dynare at 120
evalin('base',fname) ;
;"

Could you provide some suggestions?

Thanks a lot!

Best

Lixin
sunrain
 
Posts: 19
Joined: Tue Dec 11, 2007 8:46 am

Re: What's this?

Postby jpfeifer » Wed Oct 24, 2012 6:25 pm

This is a common problem discussed in the forum. Search for solutions. See e.g.
Code: Select all
http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=2580
------------
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: No registered users and 6 guests