Page 1 of 1
Restricting parameters in Dynare
Posted:
Tue May 19, 2015 2:15 pm
by German
Hello,
I am trying to optimize the parameters of a simple Taylor rule in a neo-keynisian enviroment.
The parameters turn out to be non-sensical. I was wondering if you could give me some insight:
1. Is there a possibility to impose a restriction to the parameters.
2. If not, what do you recommend?
Thank you,
Germán
Re: Restricting parameters in Dynare
Posted:
Tue May 19, 2015 5:27 pm
by jpfeifer
Which context are we talking about? In OSR, this is not easily possible yet.
In estimation, you can use the estimated_params-block to set upper and lower bound for your parameters or specify a prior that does not allow the parameters to be bigger than certain bounds.
Re: Restricting parameters in Dynare
Posted:
Tue May 19, 2015 8:24 pm
by German
Thank you for your reply.
Actually, I was thinking of implementing it on an OSR.....could you help me providing some guidance in order to do this?
Thank you again.
Kind Regards,
Germán
Re: Restricting parameters in Dynare
Posted:
Sat May 23, 2015 11:13 am
by jpfeifer
This is somewhat complicated. Please provide your current codes and indicate the bounds you want to set and I will try post an example.
Re: Restricting parameters in Dynare
Posted:
Tue May 26, 2015 3:53 pm
by German
Thank you again for your reply.
This is my mod file.
Kind Regards,
Germán
Re: Restricting parameters in Dynare
Posted:
Wed May 27, 2015 5:08 pm
by jpfeifer
Dear Germán,
you need to use the current unstable version (to be Dynare 4.5) with the attached files. In osr_optimizer_function_wrapper.m you can manually change the bounds (and the optimizer to use). It currently requires a Matlab Toolbox as I am using fmincon as an example. Note also that there is a bug in the current unstable that will soon be fixed. You need to replace in dynare_minimize_objective.m the calls to
options_.mode_compute
by
minimizer_algorithm
See
https://github.com/JohannesPfeifer/dynare/commit/be58d739d4b2338977395bceee6780955915310c
Re: Restricting parameters in Dynare
Posted:
Tue Jul 14, 2015 1:19 pm
by fabiac
Dear Dr. Pfeifer,
does this solution already apply to the current stable version of Dynare? Thanks
Re: Restricting parameters in Dynare
Posted:
Wed Jul 15, 2015 6:48 am
by jpfeifer
No, it only works with the unstable, to be published as Dynare 4.5
Re: Restricting parameters in Dynare
Posted:
Tue Jul 21, 2015 1:52 pm
by Vermandel
Hello Johannes,
After reading your code, I'm wondering whether osr now works with second order approximation to the model's policy function? (I'm asking because of the "order=2" in the osr command).
Best,
gauthier
Re: Restricting parameters in Dynare
Posted:
Wed Jul 22, 2015 8:13 am
by jpfeifer
No, because a first order approximation already delivers second-order accuracy in the unconditional moments, which osr minimizes. Going to second order would yield fourth-order accuracy.