I am starting to learn Dynare and now I have a problem with a .mod file.
I just copied the model from the Paper of Sargent et. al. (Practicing Dynare):
periods 1000;
var c k lab z;
varexo e;
parameters bet the del alp tau rho s;
bet = 0.987;
the = 0.357;
del = 0.012;
alp = 0.4;
tau = 2;
rho = 0.95;
s = 0.007;
So, it is just a copy, but when I start Dynare, the following error Message occurs:
ERROR: prac_dy_sec2.mod:17.134: syntax error, unexpected ';'
Starting Dynare …
Starting preprocessing of the model file …
error: DYNARE: preprocessing failed
error: evaluating if command near line 94, column 1
error: called from dynare' in file/home/basher/Desktop/dynare_v4/matlab/dynare.m’
But I do not see, that I have an ; somewhere, that does not belong there? So what is the Problem?? Can someone help me?
Oh, thank you JamieHall I see!!
I corrected the mistake, but now he tells me, that e is declared twice with different types! But as far as I understood, I have to declare e as varexo, and then when I model the schock section, I have to type “var e”. Isn’t that right? Has something changed? Because also in the manual, it is done in the same manner. I tried also to model the schock in the following way:
schocks;
varexo e;
…
end;
Then he tells me that e is declared twice (not with different types).
The other problem is, that when I try to compile the example1.mod file, there is an error which tells me, that dmperm is not available in this version of octave. Does anyone know what I can do???
I deleted the line in initval, but the error is still the same and it also refers to the line in the schocks section.
I am really confused!! Do you have an idea what else could be the mistake??
Now there are no more errors concerning the .mod file, but I still have this problem with dmperm in octave. Do you maybe have a guess how I can find a solution for this??
If not, THANK YOU so far for your help!!!
What do you mean by “an error with dmperm in Octave”? The function “dmperm” is implemented in Octave (at least recent versions), and it works as under MATLAB.
I also ran this program, after correcting the defect above. But there were error messages, saying that "??? Undefined function or method ‘datasaver’ for input arguments of type ‘char’."
I thought it means that “datasaver” is an unrecognized function. But how could that be, because I copied that program from a paper without changing it at all.
Two more errors:
Error in ==> growthmodel at 121
datasaver(‘simudata’,]);
I also ran this program, after correcting the defect above. But there were error messages, saying that "??? Undefined function or method ‘datasaver’ for input arguments of type ‘char’."
I thought it means that “datasaver” is an unrecognized function. But how could that be, because I copied that program from a paper without changing it at all.
Two more errors:
Error in ==> growthmodel at 121
datasaver(‘simudata’,]);
The “datasaver” function that is called at the end of the MOD file is not a Dynare command, at least in version 4. I guess it was an internal command of Dynare 3 that was used to save results in a file.
You can probably safely remove it. In Dynare 4, all the results are automatically saved into “_results.mat”. You can also use the “datatomfile” command which probably does a job similar to the old “datasaver” command.