What's this?

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!

It says there is a problem in line 116, column 34. Maybe there is a missing bracket.

dear jpfeifer,

Yes, you are right. I fixed it.

Thank you very much indeed!

Lixin

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

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
Riksbankmodel1try.mod (14.8 KB)

But with the posted model, Dynare says

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

[quote=“jpfeifer”]But with the posted model, Dynare says

[/quote]

Dear Jpfeifer,

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

Best

Lixin

[quote=“donihue”]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[/quote]

Dear Donihue,

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

Best

Lixin

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

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

[quote=“jpfeifer”]But with the posted model, Dynare says

[/quote]

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

This is a common problem discussed in the forum. Search for solutions. See e.g. [code]? Error using ==> chol Matrix must be positive definite]

Dear Jpfeifer,

Thanks lots!

I fixed it!

Thank you!

Best!

Lixn

Dear Jpfeifer,

Thanks a lots!
I fixed it!

Best

Lixin