Page 2 of 3
Re: Error!!!! evalin('base',fname) ;
Posted:
Wed May 26, 2010 7:36 pm
by audrey64140
That's what dynare compute...
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.1.0).
Starting preprocessing of the model file ...
Found 19 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
??? Error using ==> load
Unable to read file param_matrix: No such file or directory.
Error in ==> simul_olg at 115
load param_matrix;
Error in ==> dynare at 132
evalin('base',fname);
>>
Re: Error!!!! evalin('base',fname) ;
Posted:
Wed May 26, 2010 7:40 pm
by audrey64140
Sorry but i have nothing else except the mod.file called simul_olg!! I make my debut on this software!!
Re: Error!!!! evalin('base',fname) ;
Posted:
Wed May 26, 2010 7:45 pm
by jpfeifer
If you don't have the parameter matrix, you must specify the parameters in Dynare. I just guessed some values. The attached code now runs. You only have to make sure that you insert the correct parameters. One more remark: always put the check command after the steady state command as otherwise the model cannot be checked correctly as the steady state values are still missing.
Re: Error!!!! evalin('base',fname) ;
Posted:
Wed May 26, 2010 7:51 pm
by audrey64140
I thank you infinitely!!!!! it works!I shall be more watchful in the future..
Re: Error!!!! evalin('base',fname) ;
Posted:
Wed May 26, 2010 7:54 pm
by jpfeifer
And one remark on your comments. Usually, comments with // work because the Dynare preprocessor recognizes them (e.g. in the model statement). However, your line is interpreted as pure Matlab code. In this case, comments are initiated with % instead of //. The reason is that you do not compute previously defined parameters here. If you had included uoptbar and ubar in the initial parameters statement, Dynare would have correctly recognized the comment. Instead, Dynare sees this line as a line of standard Matlab code with different rules for comments.
Re: Error!!!! evalin('base',fname) ;
Posted:
Wed May 26, 2010 8:08 pm
by audrey64140
thank you very much!
Re: Error!!!! evalin('base',fname) ;
Posted:
Tue Nov 09, 2010 7:54 pm
by paragw
Hi
I am trying to run the attached code to solve for ramsey policy. When I run the code in MATLAB, I get the following.
>> dynare C:\dynare\4.1.3\work\leviathancomp\leviathanopt-ramsey.mod
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.1.3).
Starting preprocessing of the model file ...
Substitution of exo leads: added 1 auxiliary variables and equations.
Found 5 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Computing static model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
??? Error: Unexpected MATLAB operator.
Error in ==> dynare at 132
evalin('base',fname) ;
So I do have some computations but program stops with the above error message. Any suggestions? I am using MATLAB 7.10.0(R2010a).
Re: Error!!!! evalin('base',fname) ;
Posted:
Tue Nov 09, 2010 10:54 pm
by jpfeifer
There are many problems. For starters:
- Don't use a hyphen "-" in the filename. It gives you the mentioned error.
- The syntax is
- Code: Select all
planner_discount=DOUBLE;
which means you have to substitute a number for DOUBLE. By default, it is
- Code: Select all
planner_discount=1;
- Add
- Code: Select all
steady;
check;
after the initval block to compute the steady state from the initial values . - Dynare cannot handle inequality constraints like the first one.
- You did not specify an initial value for q.The default starting value for the steady state search is then 0.
- Code: Select all
q^(-a-1)
will give you an error as the exponent is negative and hence you would have a division by 0.
Re: Error!!!! evalin('base',fname) ;
Posted:
Sat Nov 13, 2010 6:25 pm
by paragw
Thanks for the response. I will try making those changes and run it again.
Re: Error!!!! evalin('base',fname) ;
Posted:
Tue Nov 16, 2010 8:54 pm
by paragw
Ok. So i made the changes you suggested and I still keep on getting the following error:
>> addpath c:\dynare\4.1.3\matlab
>> dynare C:\dynare\4.1.3\work\leviathancomp\leviathanoptramsey.mod
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.1.3).
Starting preprocessing of the model file ...
Substitution of exo leads: added 1 auxiliary variables and equations.
Found 4 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Computing static model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
??? Error: Unexpected MATLAB operator.
Error in ==> dynare at 132
evalin('base',fname) ;
I am attaching the corrected mod file. Let me know if you think of something.
Re: Error!!!! evalin('base',fname) ;
Posted:
Tue Mar 08, 2011 4:42 pm
by jrb
Good afternoon,
I am writting here because I am currently experiencing the same problem. I tried all the solutions mentioned above, I reinstalled Dynare, tried several versions, and created a dedicated "work" subfile.
Here is the complete Matlab output. I am using a student version, 7.10.0 (R2010a)
EDU>> addpath c:\dynare\4.1.0\matlab
EDU>> cd c:\dynare\work
EDU>> dynare CashInAdvanceModel-1
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.1.0).
Starting preprocessing of the model file ...
Found 13 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
??? Error using ==> evalin
Undefined function or variable 'CashInAdvanceModel'.
Error in ==> dynare at 132
evalin('base',fname) ;
It seems to me that the problem comes from that Matlab doesn't recognize the "CashInAdvanceModel" function which is defined in the .mod file
This is really frustrating because I have been stuck with this issue for a couple of hours and I can't finish my work...
I really appreciate your help,
Thank you for your time and consideration.
Best regards,
Julien
Re: Error!!!! evalin('base',fname) ;
Posted:
Tue Mar 08, 2011 5:20 pm
by jpfeifer
First, only use alphanumeric characters in the filename. So do not use a "-".
Second, in the mod-file, delete the last for loop. The "%" used for defining the string format interferes with Matlab's use of % for comments, when preprocessing with Dynare.
Re: Error!!!! evalin('base',fname) ;
Posted:
Sun Jan 22, 2012 4:38 pm
by merdogul
Hi,
i am using Dynare 4.2.4 and Matlab 7.12.0 (R2011a) and i set path to the directory c:\dynare\4.2.4\matlab but still have the same problem:
??? Error: Unexpected MATLAB operator.
Error in ==> dynare at 120
evalin('base',fname) ;
what can i do to fix this?
Thanks
Re: Error!!!! evalin('base',fname) ;
Posted:
Sun Jan 22, 2012 9:59 pm
by jpfeifer
The command
- Code: Select all
dynare homework_4_ques1
works fine for me. Did you rename the mod-file before uploading it?
Re: Error!!!! evalin('base',fname) ;
Posted:
Sun Jan 22, 2012 10:53 pm
by merdogul
Hi,
i did not change the file name but recognize that i wrote wrong command to run the code.
thank you very much...