# Potential typo in manual: third-order approximations

Dear Johannes (and other Dynare users),

I’m currently trying to back out the state space representation of a third order approximation from Dynare’s storage structure and am concerned that the manual (link: dynare.org/manual/index_26.html) has an important typo in the discussion of the G2 matrix in the third-order approximation.

The concern is in the following line:

The reason that there may be a typo is that when I run an exercise using a simple RBC model, I found that only by multiplying ALL of the unfolded version of G2 by 2 can I match the second-order matrices C, D and E as defined in the second-order approximation section of the manual (i.e. 2*oo_.dr_2 returns a folded version of the structures oo_dr.ghxx, oo_dr.ghuu and oo_dr.ghxu). If this is correct (i.e. these matrices should be equivalent) then the manual should state that all elements in the folded matrix must be multiplied by 2 (not only those columns associated with non-squared terms of the approximation).

Also, if my above intuition is right then a second issue arises in the discussion about the G3 matrix. More precisely, do we multiply cross-product terms of order 1 by 6, cross-product terms of order 2 by 3 and leave terms of order 3 as they are? If not, what would be the correct way of recovering the coefficients? A guess based on the previous case of the G2 matrix would be that we simply need to multiply all values in the G3 matrix by 3.

Jamie

We will investigate the issue. You can track it at github.com/DynareTeam/dynare/issues/1368

Dear Jamie,
I am convinced that the description in the manual is indeed correct. If you read carefully, you will note that for the description of second order, there are the 1/n! factorial prefactors from the Taylor expansion. 'Second order terms like oo_.dr.ghuu enter with a weight of 1/2. Third order terms would enter with a weight of 1/6.

However, in the description of third order, these factorial terms are omitted. Each of the G_i terms enters with a weight of 1. Therefore, at order=2

from which follows that `ghxx=2*G_2`
which is exactly what you report.

Therefore, the factor 2 (or 3 and 6 mentioned in the manual for order=3) only has to do with the unfolding, not the Taylor approximation itself.

Dear Johannes,

Thankyou for checking this. It’s good to know that the issue is a personal miss-interpretation rather than an issue with the coding/manual.