Policy Functions in Third Order Approximation

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.

Policy Functions in Third Order Approximation

Postby jpfeifer » Mon Aug 09, 2010 6:05 pm

Hi,

I would like to read out the policy functions in the case of a third order approximation and store the results in matrices like the second order matrices ghxx, ghxu, ghuu as they are created in k_order_pert.m.

That is, I want to create the matrices ghxxx, ghxxu, ghxuu and ghuuu from the matrix g_3 created from the dll-file. For that purpose, I would need to know the variable order in the columns.

Let x=[x_1, x_2,..,x_npred] denote the predetermined states and u=[u_1, u_2,...,u_exo_nbr] the exogenous states. What is the order of variables in g_3?
Is it (for npred=3, exo_nbr=2)

g_3=[gh_x1_x1_x1, gh_x1_x1_x2 , gh_x1_x1_x3, gh_x1_x1_u1,gh_x1_x1_u2, gh_x1_x2_x2,...,gh_x3_x3_x3, gh_x3_x3_u1,...,gh_x3_u2_u2,gh_u1_u1_u1,...,gh_u2_u2_u2]

where all cross-derivatives appearing the second time are folded the way indicated in the above formula? This would be the order I infer from the second order approximation. That is, x and u are stacked in a vector, we take the first entry of the Hessian and then systematically take the derivative with respect to the elements of this stacked vector. We then follow this procedure by going through the elements of the Hessian (row major as in C, along the rows first and then along columns) and take the derivative w.r.t to the stacked vector, while ignoring all derivative already encountered.
Or is it any different, e.g. we go through the Hessian along the columns first (column major as in Matlab)? From having a short look at the C-code I could not find it out by myself. The Dynare++ manual is not very informative either.

I would also like to know what the order of variables in x is? Is there maybe any variable that already contains the ordering? For u I guess the ordering is the same as in M.exo_names?
Any help would be greatly appreciated.
------------
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: Policy Functions in Third Order Approximation

Postby SébastienVillemot » Tue Aug 24, 2010 2:02 pm

Hi,

I just wrote additional documentation in the reference manual, which should answer your question.

Until a new version of the reference manual is officially released, I attach here a draft version of the updated documentation. The relevant part is around page 30.

Best,
Attachments
manual.pdf
(483.55 KiB) Downloaded 116 times
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Policy Functions in Third Order Approximation

Postby jpfeifer » Tue Aug 24, 2010 2:50 pm

Hi, thanks a lot, this answers my question.
------------
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 5 guests