% where rowredform_nbr = endo_nbr*(1+nspred+(endo_nbr+1)/2+nspred^2+nspred*exo_nr+exo_nbr^2+1+nspred^3+nspred^2*exo_nbr+nspred*exo_nbr^2+exo_nbr^3+nspred+exo_nbr)
% dREDUCEDFORM: [rowredform_nbr by totparam_nbr] in DR order, Jacobian (wrt all params) of REDUCEDFORM
% * order==1: corresponds to Iskrev (2010)'s J_2 matrix
% * order==2: corresponds to Mutschler (2015)'s J matrix
%
% DYNAMIC [rowdyn_nbr by 1] in declaration order. Steady state and dynamic model derivatives for all model variables
% minA, minB, minC and minD is the minimal state space system computed in get_minimal_state_representation
% * order==1: E[varobs] is equal to steady state
% * order==2|3: E[varobs] is computed from the pruned state space system (second|third-order accurate), as noted in section 5 of Komunjer and Ng (2011)
%
% derivatives_info [structure] for use in dsge_likelihood to compute Hessian analytically.
% Contains dA, dB, and d(B*Sigma_e*B'), where A and B are from Kalman filter. Only used at order==1.
% derivatives_info [structure] for use in dsge_likelihood to compute Hessian analytically. Only used at order==1.
% Contains dA, dB, and d(B*Sigma_e*B'), where A and B are Kalman filter transition matrice.
% persistence is necessary, because in a MC loop the numerical threshold used may provide vectors of different length, leading to crashes in MC loops
% persistent indices are necessary, because in a MC loop the numerical threshold
% used may provide vectors of different length, leading to crashes in MC loops
%initialize output structures
ide_hess=struct();%Jacobian of asymptotic/simulated information matrix
ide_reducedform=struct();%Jacobian of steady state and reduced form solution
ide_dynamic=struct();%Jacobian of steady state and dynamic model derivatives
ide_moments=struct();%Jacobian of first two moments (Iskrev, 2010; Mutschler, 2015)
ide_spectrum=struct();%Gram matrix of Jacobian of spectral density plus Gram matrix of Jacobian of steady state (Qu and Tkachenko, 2012; Mutschler, 2015)
ide_minimal=struct();%Jacobian of minimal system (Komunjer and Ng, 2011)
derivatives_info=struct();%storage for Jacobians used in dsge_likelihood.m for (analytical or simulated) asymptotic Gradient and Hession of likelihood
ide_hess=struct();%Identification structure based on asymptotic/simulated information matrix
ide_reducedform=struct();%Identification structure based on steady state and reduced form solution
ide_dynamic=struct();%Identification structure based on steady state and dynamic model derivatives
ide_moments=struct();%Identification structure based on first two moments (Iskrev, 2010; Mutschler, 2015)
ide_spectrum=struct();%Identification structure based on Gram matrix of Jacobian of spectral density plus Gram matrix of Jacobian of steady state (Qu and Tkachenko, 2012; Mutschler, 2015)
ide_minimal=struct();%Identification structure based on mean and minimal system (Komunjer and Ng, 2011)
derivatives_info=struct();%storage for first-order perturbation Jacobians used in dsge_likelihood.m
totparam_nbr=length(params);%number of all parameters to be checked
modparam_nbr=length(indpmodel);%number of model parameters to be checked
...
...
@@ -114,11 +115,6 @@ if ~isempty(estim_params_)
end
%get options (see dynare_identification.m for description of options)
% Komunjer and Ng is not computed if (1) minimality conditions are not fullfilled or (2) there are more shocks and measurement errors than observables, so we need to reset options