ERROR: Illegal use of reserved keyword "end"

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.

ERROR: Illegal use of reserved keyword "end"

Postby VChamouleau » Wed Mar 01, 2017 6:29 pm

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!
Attachments
VCbaxcru.mod
Replication of Baxter and Crucini (1995)
(2.78 KiB) Downloaded 66 times
VChamouleau
 
Posts: 2
Joined: Wed Mar 01, 2017 6:19 pm

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

Postby VChamouleau » Wed Mar 01, 2017 6:34 pm

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....
VChamouleau
 
Posts: 2
Joined: Wed Mar 01, 2017 6:19 pm

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

Postby ACL » Thu Mar 02, 2017 5:21 am

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.
ACL
 
Posts: 8
Joined: Sat Nov 28, 2015 4:00 am

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

Postby ACL » Thu Mar 02, 2017 5:28 am

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.
ACL
 
Posts: 8
Joined: Sat Nov 28, 2015 4:00 am

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

Postby jpfeifer » Thu Mar 02, 2017 7:17 am

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?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests