Page 1 of 1

ERROR: Illegal use of reserved keyword "end"

PostPosted: Wed Mar 01, 2017 6:29 pm
by VChamouleau
Hi all,
Thanks for considering this post.
As mentionned in the title, I keep getting the error:

"Error: File: VCbaxcru.m Line: 303 Column:
1
Illegal use of reserved keyword "end".

Error in dynare (line 180)
evalin('base',fname) ;"

Can someone help me out? Thanks a lot!

Re: ERROR: Illegal use of reserved keyword "end"

PostPosted: Wed Mar 01, 2017 6:34 pm
by VChamouleau
Running the .m file yields the message that the steady state has no solution.
That may explain my issue.

If anyone has a better solution....

Re: ERROR: Illegal use of reserved keyword "end"

PostPosted: Thu Mar 02, 2017 5:21 am
by ACL
For your first problem, I think you placed a

";"

in between the end of your parameter block and the beginning of your model block.

Once this was removed, the file initially ran, but as you mentioned, there is a problem with the model isolating a steady-state.

Re: ERROR: Illegal use of reserved keyword "end"

PostPosted: Thu Mar 02, 2017 5:28 am
by ACL
VChamouleau wrote:Running the .m file yields the message that the steady state has no solution.
That may explain my issue.

If anyone has a better solution....


You may also want to double-check your model equations...for example, for your first equation for each of the home and foreign the equation, which represents an Euler, I think (I am not familiar with the model you are working with) seems awkward as the consumption variables are contemporaneous rather than dynamic, which strikes me as odd.

Specifically, you have

p =((c^(theta))*((1-n)^(1-theta))^(-sigma))*theta*(c^(1-theta))*((1-n)^(1-theta));

which strikes me as odd because this can simply be written

p =((c^(theta))*((1-n)^(1-theta))^(1-sigma))*theta;

but I could be wrong here. In any case, your equation here struck me as slightly odd...hope this helps.

Re: ERROR: Illegal use of reserved keyword "end"

PostPosted: Thu Mar 02, 2017 7:17 am
by jpfeifer
The first message comes from the
Code: Select all
end;

at the end of the parameter definitions. Parameter definitions do not go into a block that needs to be ended.
Also, as ACL suggested, check all your equations. The Euler equation looks strange. There are hardly any variables dated (+1). The FOC for capital also looks strange:
Code: Select all
z     =alpha*y/k(-1);

Shouldn't the derivative with respect to capital have a
Code: Select all
(1-alpha)

and not an alpha as in the wage equation?