# Syntax error, unexpected COMMA, expecting EQUAL

**URL:** <https://forum.dynare.org/t/syntax-error-unexpected-comma-expecting-equal/2128>\
**Category:** Dynare help (legacy posts)\
**Created:** [30 August 2011 14:26 UTC](https://forum.dynare.org/t/syntax-error-unexpected-comma-expecting-equal/2128 "2011-08-30T14:26:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dongji87](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@dongji87](https://forum.dynare.org/u/dongji87)\
**Post date:** [30 August 2011 14:26 UTC](https://forum.dynare.org/t/syntax-error-unexpected-comma-expecting-equal/2128/1 "2011-08-30T14:26:38Z")

</div>

Hi, everyone!  
I have a prblem now. An error always occur while i was running my program, which includes bayesian estimation. I followed the syntax of bayesian estimation and wrote stringently. Nothing in line 123 seems to be wrong, but dynare reports “syntax error, unexpected COMMA, expecting EQUAL” . Like the folllowing:

> > dynare fs2000

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.2.1).  
Starting preprocessing of the model file …  
ERROR: fs2000.mod:123.2: syntax error, unexpected COMMA, expecting EQUAL

??? Error using ==\> dynare at 126  
DYNARE: preprocessing failed

Could you please help me! Thanks a lot!  
[fs2000.mod](https://forum.dynare.org/uploads/default/original/2X/2/2b344129de6d843f6a3ceac13d68d342dd4f215a.mod) (4.24 KB)  
[fs2000.m](https://forum.dynare.org/uploads/default/original/2X/a/ac5725f2fb889928a62fb35a7e55384fb85b8a08.m) (4.81 KB)

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [30 August 2011 15:20 UTC](https://forum.dynare.org/t/syntax-error-unexpected-comma-expecting-equal/2128/2 "2011-08-30T15:20:44Z")

</div>

The command in line 122 should be

```auto

```

not

```auto

```

---

<div class="post-metadata">

**Author:** ![stepan-a](https://forum.dynare.org/user_avatar/forum.dynare.org/stepan-a/32/6652_2.png) [@stepan-a](https://forum.dynare.org/u/stepan-a)\
**Post date:** [30 August 2011 15:27 UTC](https://forum.dynare.org/t/syntax-error-unexpected-comma-expecting-equal/2128/3 "2011-08-30T15:27:36Z")

</div>

Hi, I found a lot of errors in your mod file… I won’t correct all of them…

There are typos in the block where the estimated parameters are declared. The name of the block is not

```auto
estimated parameters;
```

but

\*]`
estimated_params;
`

You have to replace on the second line of this block

```auto
narmal_pdf
```

by

```auto
normal_pdf
```

don’t forget the comma. Also you are using a variable beta before the model block. This parameter is not declared or initialized. So Dynare interprets beta as a matlab instruction… And dynare (matlab) crashes because the beta function needs (at least) two input arguments. I replaced beta by parameter bet.

There is still a problem with the steady state because you did not initialized all the parameters.

Best,  
Stéphane.

---

<div class="post-metadata">

**Author:** ![dongji87](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@dongji87](https://forum.dynare.org/u/dongji87)\
**Post date:** [30 August 2011 18:34 UTC](https://forum.dynare.org/t/syntax-error-unexpected-comma-expecting-equal/2128/4 "2011-08-30T18:34:51Z")

</div>

Thank you so much, friends! I am a new comer of Dynare, and I feel so lucky to meet you all! Best regards to you!

---

<div class="post-metadata">

**Author:** ![dongji87](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@dongji87](https://forum.dynare.org/u/dongji87)\
**Post date:** [30 August 2011 18:36 UTC](https://forum.dynare.org/t/syntax-error-unexpected-comma-expecting-equal/2128/5 "2011-08-30T18:36:16Z")

</div>

[quote=“StephaneAdjemian”]Hi, I found a lot of errors in your mod file… I won’t correct all of them…

There are typos in the block where the estimated parameters are declared. The name of the block is not

```auto
estimated parameters;
```

but

\*]`
estimated_params;
`

You have to replace on the second line of this block

```auto
narmal_pdf
```

by

```auto
normal_pdf
```

don’t forget the comma. Also you are using a variable beta before the model block. This parameter is not declared or initialized. So Dynare interprets beta as a matlab instruction… And dynare (matlab) crashes because the beta function needs (at least) two input arguments. I replaced beta by parameter bet.

There is still a problem with the steady state because you did not initialized all the parameters.

Best,  
Stéphane.[/quote]

Thank you so much, friend! I am a new comer of Dynare, and I feel so lucky to meet you ! Best regards to you!

---

<div class="post-metadata">

**Author:** ![dongji87](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@dongji87](https://forum.dynare.org/u/dongji87)\
**Post date:** [30 August 2011 18:37 UTC](https://forum.dynare.org/t/syntax-error-unexpected-comma-expecting-equal/2128/6 "2011-08-30T18:37:11Z")

</div>

[quote=“jpfeifer”]The command in line 122 should be

```auto

```

not

```auto

```

Thank you, friend. I will correct them!

---

<div class="post-metadata">

**Author:** ![dongji87](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@dongji87](https://forum.dynare.org/u/dongji87)\
**Post date:** [31 August 2011 14:50 UTC](https://forum.dynare.org/t/syntax-error-unexpected-comma-expecting-equal/2128/7 "2011-08-31T14:50:36Z")

</div>

[quote=“StephaneAdjemian”]Hi, I found a lot of errors in your mod file… I won’t correct all of them…  
Best,  
Stéphane.[/quote]

```
Hello, Professor Adjemian. I have sent an email to you, is this the right email address? [stephane.adjemian@ens.fr](mailto:stephane.adjemian@ens.fr).

```

In this email, I sent you the a word file of my whole model, and there is the new .mod file I have corrected. Maybe there is still some stupid mistakes, please forgive me for that. I hope you have a look at my model and give me some suggestions. Is there something unreasonable with my model specification, which caused dynare to crash? Why I always cannot get a steady state and face a spurious convergence problem?  
If you need anything else, just tell me, I will cooperate. Thanks very much!

```
yours, Qingyin, Ma
```

---

<div class="post-metadata">

**Author:** ![stepan-a](https://forum.dynare.org/user_avatar/forum.dynare.org/stepan-a/32/6652_2.png) [@stepan-a](https://forum.dynare.org/u/stepan-a)\
**Post date:** [1 September 2011 08:39 UTC](https://forum.dynare.org/t/syntax-error-unexpected-comma-expecting-equal/2128/8 "2011-09-01T08:39:03Z")

</div>

Dear Qingyin,

It’s probably a problem with the choice of the initial values for the endogenous variables. You have to try different values… But the best approach would be to compute the steady state analytically and to provide the closed form expression to dynare (you will find a lot of  
posts on this forum describing how to do this). Even if there is no closed form solution for the steady state, you can always concentrate the  
problem and solve a smaller set of non linear equations (you have then to use a steadystate file, you will also find examples for this on the forum).

Best,  
Stéphane.

---

<div class="post-metadata">

**Author:** ![dongji87](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@dongji87](https://forum.dynare.org/u/dongji87)\
**Post date:** [1 September 2011 10:48 UTC](https://forum.dynare.org/t/syntax-error-unexpected-comma-expecting-equal/2128/9 "2011-09-01T10:48:41Z")

</div>

Thanks professor, I will have a try！Good Luck.  
Yours, Qingyin Ma
