Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Johannes Pfeifer
dynare
Commits
fe8ae2c5
Commit
fe8ae2c5
authored
Aug 02, 2012
by
MichelJuillard
Browse files
adding doc *.m file for k_order_perturbation MEX
parent
9e6c5857
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/k_order_perturbation.m
0 → 100644
View file @
fe8ae2c5
% [err, g_0, g_1, g_2, g_3, derivs] = k_order_perturbation(dr,DynareModel,DynareOptions)
% 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
%
% OUTPUTS
% err: double err code (currently unused)
% g_0: vector dynare++ output. Constant effect of future volatility (in
% dr.order_var order) on the decision rule
% (=ghs2/2). Contains zero when order of
% approximation is 1.
% g_1: matrix dynare++ output. First order Taylor coefficients
% of decision rule. When order of approximation
% is 3, the. Contains both the effect of
% state endogenous variable and shocks. The rows
% are in dr.order_var order. The columns are in
% dr.order_var order of state endogenous
% variables and shocks
% g_2: matrix dynare++ output. Second order Taylor coefficients of decision
% rule. Contains both the effect of state endogenous
% variable and shocks. The rows are in dr.order_var
% order. Each row corresponds to the vectorized
% version of the lower triangle of the Hessian
% matrix. The Taylor coefficient (1/2) is
% included. The columns of the Hessian matrix are in
% dr.order_var order of state endogenous variables
% and shocks
% g_3: matrix dynare++ output. Third order Taylor coefficients of decision
% rule. Contains both the effect of state endogenous
% variable and shocks. The rows are in dr.order_var
% order. Each row corresponds to the vectorized
% version of the 3rd order derivatives tensor where each
% combination of variables appears only once.
% The Taylor coefficient (1/6) is
% included. Inside the tensor, the variables are in
% dr.order_var order of state endogenous variables
% and shocks
% derivs struct contains the original derivatives of the
% decision function (ghx, ghu, ghxx, ghxu, ghuu,
% ghs2, ghxxx, ghxxu, ghxuu,ghuuu, ghxss, ghuss),
% keeping the effect of future volatility
% separate (in ghs2, ghxss and ghuss). The
% derivatives matrices contain full versions of
% the Hessian matrices and 3rd order
% tensor. Symmetric derivatives are repeated. The
% Taylor coefficients (1/2 and 1/6) aren't
% included.
% k_order_peturbation is a compiled MEX function. It's source code is in
% dynare/mex/sources/k_order_perturbation.cc and it uses code provided by
% dynare++
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment