Restricting parameters in Dynare

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.

Restricting parameters in Dynare

Postby German » Tue May 19, 2015 2:15 pm

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
German
 
Posts: 8
Joined: Fri Mar 14, 2014 12:28 am

Re: Restricting parameters in Dynare

Postby jpfeifer » Tue May 19, 2015 5:27 pm

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.
------------
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

Re: Restricting parameters in Dynare

Postby German » Tue May 19, 2015 8:24 pm

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
German
 
Posts: 8
Joined: Fri Mar 14, 2014 12:28 am

Re: Restricting parameters in Dynare

Postby jpfeifer » Sat May 23, 2015 11:13 am

This is somewhat complicated. Please provide your current codes and indicate the bounds you want to set and I will try post an example.
------------
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

Re: Restricting parameters in Dynare

Postby German » Tue May 26, 2015 3:53 pm

Thank you again for your reply.

This is my mod file.

Kind Regards,
Germán
Attachments
sinramsey.mod
(4.21 KiB) Downloaded 216 times
German
 
Posts: 8
Joined: Fri Mar 14, 2014 12:28 am

Re: Restricting parameters in Dynare

Postby jpfeifer » Wed May 27, 2015 5:08 pm

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
Attachments
sinramsey.mod
(4.25 KiB) Downloaded 242 times
osr_optimizer_function_wrapper.m
Manually change the bounds in this file
(689 Bytes) Downloaded 234 times
------------
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

Re: Restricting parameters in Dynare

Postby fabiac » Tue Jul 14, 2015 1:19 pm

Dear Dr. Pfeifer,

does this solution already apply to the current stable version of Dynare? Thanks
fabiac
 
Posts: 23
Joined: Sun Jun 27, 2010 3:35 pm

Re: Restricting parameters in Dynare

Postby jpfeifer » Wed Jul 15, 2015 6:48 am

No, it only works with the unstable, to be published as Dynare 4.5
------------
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

Re: Restricting parameters in Dynare

Postby Vermandel » Tue Jul 21, 2015 1:52 pm

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
Vermandel
 
Posts: 7
Joined: Wed Jul 06, 2011 11:06 am
Location: Paris

Re: Restricting parameters in Dynare

Postby jpfeifer » Wed Jul 22, 2015 8:13 am

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.
------------
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: Google [Bot] and 6 guests