shocks_file not working

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.

shocks_file not working

Postby endi75 » Fri Dec 28, 2012 4:57 pm

Dear developers,
I'd like to run a deterministic simulation of a neoclassical growth model with TFP shocks saved in an auxiliary file.
The reason is that the shocks depend on the calibration (the capital share and the depreciation parameters) and I'd like to automatize the process.
When I run the code with shocks manually included in the .mod file, the program works fine.
However, when I use "shocks(shocks_file=filename)" I get the error message: syntax error, unexpected '(', expecting ';'
I found another post with a similar problem but no solution.
I attach the three relevant files to run the code.
I'm using Dynare 4.2.0 on a Mac OS X.
Thanks,
AF
Attachments
tfp_china.m
(2.04 KiB) Downloaded 136 times
china_TFP_calc.xls
(37 KiB) Downloaded 113 times
china_adjc.mod
(3.07 KiB) Downloaded 140 times
endi75
 
Posts: 5
Joined: Sat Jan 14, 2006 6:30 pm

Re: shocks_file not working

Postby SébastienVillemot » Tue Jan 15, 2013 10:12 am

There is no "shocks_file" option. So it is no surprise that Dynare crashes. Where did you get the information about such an option?

Also, you should upgrade to the latest Dynare (4.3.1 as of the time of this writing).

Regards,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: shocks_file not working

Postby endi75 » Tue Jan 15, 2013 2:28 pm

Sebastien,
See section 4.1.4 of the User Manual by Tommaso Mancini Griffoli (page 42).
As I mentioned in my original posts, I found other entries in the forum in which the problem was discussed (but not solved).
Perhaps it's an old command that has been discontinued in recent versions?
Is there an alternative in the current version?
Again, my problem is that I'd like to automatize the process that calculates TFP shocks as a function of the calibration.
Having an external file for the shocks is, in my view, the best solution but other suggestions are welcome.
Thanks,
A.
endi75
 
Posts: 5
Joined: Sat Jan 14, 2006 6:30 pm

Re: shocks_file not working

Postby SébastienVillemot » Tue Jan 15, 2013 3:37 pm

Indeed the shocks_file option has been deprecated, and replaced by the initval_file command. Please see the corresponding entry in the reference manual.

I am going to fix the user guide so that it mentions initval_file instead of shocks_file.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: shocks_file not working

Postby endi75 » Tue Jan 15, 2013 3:54 pm

Thanks.
Can I use the initval_file command to specify a sequence of exogenous shocks in a deterministic simulation?
Could you pls give an example, perhaps using the file I attached in my initial message?
Thanks,
A.
endi75
 
Posts: 5
Joined: Sat Jan 14, 2006 6:30 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 9 guests