Error Syntax "Unexpected EXP"

Hello, I am trying to replicate a paper.
I change all the variable x to exp(x) to get log-linear approximation. Then I got the following error when runing the .mod file.
Starting preprocessing of the model file …
ERROR: CF18lab.mod: line 147, cols 5-7: syntax error, unexpected EXP

Ps: before changing all variables x to exp(x) =, everthing is ok.
Is there any one ever encountered this issue or know how to solve it, plz leave me an advice!

Thanks a lot!

It is difficult to identify the issue without the mod file… I do not know what you wrote around around line 147, or if this line is in the model block. If you log linearise the whole model, you can alternatively use the loglinear option in stoch_simul.

Best,
Stéphane.

1 Like

Thanks a lot, I just messaged you relating the mod file.
Best,

The problem solved. I should not have changed all variable x to exp(x) in both model and intval block.
If I change only in model block from x to exp(x); and keep x= ln(…) in the intval block, it works well! You need to provide initial values of the declared variable directly x=…; not exp(x)=…, dynare cannot understand implicitly the initial values.
Thank Stephane for pointing out this.