2020-01-10 17:55:57 +01:00
|
|
|
% [dynpp_derivs, dyn_derivs] = k_order_perturbation(dr,DynareModel,DynareOptions,g1,g2,g3)
|
2012-08-02 11:25:52 +02:00
|
|
|
% computes a k_order_petrubation solution for k=1,2,3
|
|
|
|
%
|
|
|
|
% INPUTS
|
|
|
|
% dr: struct describing the reduced form solution of the model.
|
|
|
|
% DynareModel: struct jobs's parameters
|
|
|
|
% DynareOptions: struct job's options
|
2019-04-08 16:59:48 +02:00
|
|
|
% g1: matrix First order derivatives of the model (optional)
|
|
|
|
% g2: matrix Second order derivatives of the model (optional)
|
|
|
|
% g3: matrix Third order derivatives of the model (optional)
|
2012-08-02 11:25:52 +02:00
|
|
|
%
|
|
|
|
% OUTPUTS
|
2019-04-08 16:59:48 +02:00
|
|
|
% dynpp_derivs struct Derivatives of the decision rule in Dynare++ format.
|
|
|
|
% The tensors are folded and the Taylor coefficients (1/n!) are
|
2012-08-02 11:25:52 +02:00
|
|
|
% included.
|
2019-04-08 16:59:48 +02:00
|
|
|
% Fieldnames are g_0, g_1, g_2, …
|
|
|
|
% dyn_derivs struct Derivatives of the decision rule in Dynare format, up to third order.
|
|
|
|
% Matrices are dense and unfolded. The Taylor coefficients (1/2
|
|
|
|
% and 1/6) aren't included.
|
|
|
|
% The derivatives w.r.t. different categories of variables
|
|
|
|
% are separated.
|
|
|
|
% Fieldnames are:
|
|
|
|
% + gy, gu
|
|
|
|
% + if order ≥ 2: gyy, gyu, guu, gss
|
|
|
|
% + if order ≥ 3: gyyy, gyyu, gyuu, guuu, gyss, guss
|
|
|
|
%
|
|
|
|
% k_order_perturbation is a compiled MEX function. It's source code is in
|
2012-08-02 11:25:52 +02:00
|
|
|
% dynare/mex/sources/k_order_perturbation.cc and it uses code provided by
|
|
|
|
% dynare++
|
2013-06-12 16:42:09 +02:00
|
|
|
|
2020-01-10 17:55:57 +01:00
|
|
|
% Copyright (C) 2013-2020 Dynare Team
|
2013-06-12 16:42:09 +02:00
|
|
|
%
|
|
|
|
% This file is part of Dynare.
|
|
|
|
%
|
|
|
|
% Dynare is free software: you can redistribute it and/or modify
|
|
|
|
% it under the terms of the GNU General Public License as published by
|
|
|
|
% the Free Software Foundation, either version 3 of the License, or
|
|
|
|
% (at your option) any later version.
|
|
|
|
%
|
|
|
|
% Dynare is distributed in the hope that it will be useful,
|
|
|
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
% GNU General Public License for more details.
|
|
|
|
%
|
|
|
|
% You should have received a copy of the GNU General Public License
|
|
|
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|