Page 1 of 1

syntax error

PostPosted: Thu Sep 10, 2009 11:04 am
by ntory
Hi everyone,
I am currently working on a DSGE model.

I tried several times but I always got the message

....................................................................
Starting Dynare ...
Starting preprocessing of the model file ...
ERROR: plz.mod:105.0-1: syntax error, unexpected $end

??? Error using ==> dynare
DYNARE: preprocessing failed
...................................................................

I think this is a simple problem but I can't find which part is wrong.
I am attching my mod file plz take a look..

Thanks so much for your help in advance.

Re: syntax error

PostPosted: Thu Sep 10, 2009 2:58 pm
by StephaneAdjemian
Dear ntory,

You have too much typos and errors in your mod file... You should first read the dynare manual... You will learn that:

[1] Dynare is case sensitive.
[2] You cannot mix bayesian and maximum likelihood estimation.
[3] Each line must be closed by a semi colon.
[4] The estimated parameters are declared in the estimated_params block and not the estimated params block.
[5] The initial values of the endogenous variables are declared in the initval block and not the intival block.

... and a lot more.

Best,
Stéphane.

Re: syntax error

PostPosted: Fri Sep 11, 2009 12:02 am
by ntory
Thank you so much.
it's a little bit shame
..
anyway thanks again :)

Re: syntax error

PostPosted: Mon Sep 14, 2009 8:09 am
by SébastienVillemot
Also note that the line...

Code: Select all
ERROR: plz.mod:105.0-1: syntax error, unexpected $end


...means that the error is located at line 105 of your MOD file, between columns 0 and 1.

Best,

Re: syntax error

PostPosted: Mon Sep 14, 2009 1:29 pm
by ntory
thanks. :)

I corrected mistakes as far as I know, but I keep getting same error message which I mentioned before.
What did I wrong ..
i'm attaching modified mod file, could anyone check this one plz?

+ Can I use kalman filter in Dynare?
it's not included in model yet but one of shocks should amended using kalman filter based on assumption of model that I set up..

Re: syntax error

PostPosted: Tue Sep 15, 2009 10:09 am
by SébastienVillemot
Hi,

This seems to come from your text editor which creates files using 16-bit unicode text:

Code: Select all
sebastien@karaba:~$ file basemodel4.mod
basemodel4.mod: Little-endian UTF-16 Unicode text, with CRLF, CR line terminators


You can find more information on Unicode on this page:

http://en.wikipedia.org/wiki/Unicode

The cause of the problem is most certainly the use of 16-bit unicode. When I convert your file to standard 8-bit ASCII, Dynare no longer shows this message (but it complains elsewhere).

So my advice is: change the settings of your editor to more standard ones, or use another editor :D

Best,

Re: syntax error

PostPosted: Wed Sep 16, 2009 1:38 am
by ntory
Thanks Sebastien :)

Re: syntax error

PostPosted: Wed Aug 07, 2013 1:45 pm
by selima
Sorry for the annoyance, I have the same error and I would like to know how to convert my file to standard 8-bit ASCII?
thank you for answering me .