Add headers to identification routines
parent
f37d3afb14
commit
bf5a3ab6da
|
@ -1,8 +1,38 @@
|
||||||
function [H, dA, dOm, Hss, gp, d2A, d2Om, H2ss] = getH(A, B, M_,oo_,options_,kronflag,indx,indexo,iv)
|
function [H, dA, dOm, Hss, gp, d2A, d2Om, H2ss] = getH(A, B, M_,oo_,options_,kronflag,indx,indexo,iv)
|
||||||
|
% function [H, dA, dOm, Hss, gp, d2A, d2Om, H2ss] = getH(A, B, M_,oo_,options_,kronflag,indx,indexo,iv)
|
||||||
% computes derivative of reduced form linear model w.r.t. deep params
|
% computes derivative of reduced form linear model w.r.t. deep params
|
||||||
%
|
%
|
||||||
% Copyright (C) 2010-2012 Dynare Team
|
% Inputs:
|
||||||
|
% A: Transition matrix of lagged states from Kalman filter
|
||||||
|
% B: Matrix in state transition equation mapping shocks today to
|
||||||
|
% states today
|
||||||
|
% M_: structure storing the model information
|
||||||
|
% oo_: structure storing the results
|
||||||
|
% options_: structure storing the options
|
||||||
|
% kronflag: Indicator whether to rely on Kronecker products (1) or
|
||||||
|
% not (-1 or -2)
|
||||||
|
% indx: Index of estimated parameters in M_.params
|
||||||
|
% indexo: Index of estimated standard deviations in M_.exo_names
|
||||||
|
% iv: Index of considered variables
|
||||||
|
%
|
||||||
|
% Outputs:
|
||||||
|
% H: dTAU/dTHETA: Jacobian of TAU, vectorized form of
|
||||||
|
% linearized reduced form state space model, given ys [steady state],
|
||||||
|
% A [transition matrix], B [matrix of shocks], Sigma [covariance of shocks]
|
||||||
|
% TAU = [ys; vec(A); dyn_vech(B*Sigma*B')].
|
||||||
|
% dA: [endo_nbr by endo_nbr by (indx+indexo)] Jacobian of transition matrix A
|
||||||
|
% dOm: [endo_nbr by endo_nbr by (indx+indexo)] Jacobian of Omega = (B*Sigma*B')
|
||||||
|
% Hss: [endo_nbr by (indx)] Jacobian of steady state with respect to estimated
|
||||||
|
% structural parameters only (indx)
|
||||||
|
% gp: Jacobian of linear rational expectation matrices [i.e.
|
||||||
|
% Jacobian of dynamic model] with respect to estimated
|
||||||
|
% structural parameters only (indx)
|
||||||
|
% d2A: Hessian of transition matrix A
|
||||||
|
% d2Om: Hessian of Omega
|
||||||
|
% H2s: Hessian of steady state with respect to estimated
|
||||||
|
% structural parameters only (indx)
|
||||||
|
|
||||||
|
% Copyright (C) 2010-2016 Dynare Team
|
||||||
%
|
%
|
||||||
% This file is part of Dynare.
|
% This file is part of Dynare.
|
||||||
%
|
%
|
||||||
|
|
|
@ -1,6 +1,43 @@
|
||||||
function [JJ, H, gam, gp, dA, dOm, dYss] = getJJ(A, B, M_,oo_,options_,kronflag,indx,indexo,mf,nlags,useautocorr)
|
function [JJ, H, gam, gp, dA, dOm, dYss] = getJJ(A, B, M_,oo_,options_,kronflag,indx,indexo,mf,nlags,useautocorr)
|
||||||
|
% function [JJ, H, gam, gp, dA, dOm, dYss] = getJJ(A, B, M_,oo_,options_,kronflag,indx,indexo,mf,nlags,useautocorr)
|
||||||
|
% computes derivatives of 1st and 2nd order moments of observables with
|
||||||
|
% respect to estimated parameters
|
||||||
|
%
|
||||||
|
% Inputs:
|
||||||
|
% A: Transition matrix of lagged states from Kalman filter
|
||||||
|
% B: Matrix in state transition equation mapping shocks today to
|
||||||
|
% states today
|
||||||
|
% M_: structure storing the model information
|
||||||
|
% oo_: structure storing the results
|
||||||
|
% options_: structure storing the options
|
||||||
|
% kronflag: Indicator whether to rely on Kronecker products (1) or
|
||||||
|
% not (-1 or -2)
|
||||||
|
% indx: Index of estimated parameters in M_.params
|
||||||
|
% indexo: Index of estimated standard deviations in M_.exo_names
|
||||||
|
% mf: Index of observed variables
|
||||||
|
% nlags: Number of lags to consider for covariances and
|
||||||
|
% correlations
|
||||||
|
% useautocorr: Indicator on whether to use correlations (1) instead of
|
||||||
|
% covariances (0)
|
||||||
|
%
|
||||||
|
% Outputs:
|
||||||
|
% JJ: Jacobian of 1st and 2nd order moments of observables, i.e. dgam/dTHETA
|
||||||
|
% (see below for definition of gam)
|
||||||
|
% H: dTAU/dTHETA: Jacobian of TAU, vectorized form of
|
||||||
|
% linearized reduced form state space model, given ys [steady state],
|
||||||
|
% A [transition matrix], B [matrix of shocks], Sigma [covariance of shocks]
|
||||||
|
% TAU = [ys; vec(A); dyn_vech(B*Sigma*B')].
|
||||||
|
% gam: vector of theoretical moments of observed variables mf [JJ is the Jacobian of gam].
|
||||||
|
% gam = [ys(mf); dyn_vech(GAM{1}); vec(GAM{j+1})]; for j=1:ar and where
|
||||||
|
% GAM is the first output of th_autocovariances
|
||||||
|
% gp: Jacobian of linear rational expectation matrices [i.e.
|
||||||
|
% Jacobian of dynamic model] with respect to estimated
|
||||||
|
% structural parameters only (indx)
|
||||||
|
% dA: [endo_nbr by endo_nbr by (indx+indexo)] Jacobian of transition matrix A
|
||||||
|
% dOm: Jacobian of Omega = (B*Sigma*B')
|
||||||
|
% dYss Jacobian of steady state with respect to estimated structural parameters only (indx)
|
||||||
|
|
||||||
% Copyright (C) 2010-2012 Dynare Team
|
% Copyright (C) 2010-2016 Dynare Team
|
||||||
%
|
%
|
||||||
% This file is part of Dynare.
|
% This file is part of Dynare.
|
||||||
%
|
%
|
||||||
|
|
|
@ -7,11 +7,12 @@ function [ide_hess, ide_moments, ide_model, ide_lre, derivatives_info, info] = i
|
||||||
% o indx [array] index of estimated parameters
|
% o indx [array] index of estimated parameters
|
||||||
% o indexo [array] index of estimated shocks
|
% o indexo [array] index of estimated shocks
|
||||||
% o options_ident [structure] identification options
|
% o options_ident [structure] identification options
|
||||||
% o data_info [structure] data info for Kalman Filter
|
% o dataset_ [structure] the dataset after required transformation
|
||||||
|
% o dataset_info [structure] Various informations about the dataset (descriptive statistics and missing observations) info for Kalman Filter
|
||||||
% o prior_exist [integer]
|
% o prior_exist [integer]
|
||||||
% =1 when prior exists and indentification is checked only for estimated params and shocks
|
% =1 when prior exists and indentification is checked only for estimated params and shocks
|
||||||
% =0 when prior is not defined and indentification is checked for all params and shocks
|
% =0 when prior is not defined and indentification is checked for all params and shocks
|
||||||
% o nem_tex [char] list of tex names
|
% o name_tex [char] list of tex names
|
||||||
% o init [integer] flag for initialization of persistent vars
|
% o init [integer] flag for initialization of persistent vars
|
||||||
%
|
%
|
||||||
% OUTPUTS
|
% OUTPUTS
|
||||||
|
@ -25,7 +26,7 @@ function [ide_hess, ide_moments, ide_model, ide_lre, derivatives_info, info] = i
|
||||||
% SPECIAL REQUIREMENTS
|
% SPECIAL REQUIREMENTS
|
||||||
% None
|
% None
|
||||||
|
|
||||||
% Copyright (C) 2008-2013 Dynare Team
|
% Copyright (C) 2008-2016 Dynare Team
|
||||||
%
|
%
|
||||||
% This file is part of Dynare.
|
% This file is part of Dynare.
|
||||||
%
|
%
|
||||||
|
|
Loading…
Reference in New Issue