Syntax error

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.
plz.mod (4.7 KB)

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.


Thank you so much.
it’s a little bit shame

anyway thanks again :slight_smile:

Also note that the line…

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.


thanks. :slight_smile:

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…
    basemodel4.mod (4.3 KB)


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

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:

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 :smiley:


Thanks Sebastien :slight_smile:

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 .