syntax error

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.

syntax error

Postby ntory » Thu Sep 10, 2009 11:04 am

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.
Attachments
plz.mod
(4.7 KiB) Downloaded 155 times
ntory
 
Posts: 7
Joined: Thu Sep 10, 2009 10:56 am

Re: syntax error

Postby StephaneAdjemian » Thu Sep 10, 2009 2:58 pm

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.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: syntax error

Postby ntory » Fri Sep 11, 2009 12:02 am

Thank you so much.
it's a little bit shame
..
anyway thanks again :)
ntory
 
Posts: 7
Joined: Thu Sep 10, 2009 10:56 am

Re: syntax error

Postby SébastienVillemot » Mon Sep 14, 2009 8:09 am

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,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: syntax error

Postby ntory » Mon Sep 14, 2009 1:29 pm

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..
Attachments
basemodel4.mod
(4.3 KiB) Downloaded 143 times
ntory
 
Posts: 7
Joined: Thu Sep 10, 2009 10:56 am

Re: syntax error

Postby SébastienVillemot » Tue Sep 15, 2009 10:09 am

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,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: syntax error

Postby ntory » Wed Sep 16, 2009 1:38 am

Thanks Sebastien :)
ntory
 
Posts: 7
Joined: Thu Sep 10, 2009 10:56 am

Re: syntax error

Postby selima » Wed Aug 07, 2013 1:45 pm

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 .
selima
 
Posts: 46
Joined: Thu Jan 10, 2013 5:13 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests