Measuring the Effects of a Shock to Monetary Policy - Humboldt ...
Measuring the Effects of a Shock to Monetary Policy - Humboldt ...
Measuring the Effects of a Shock to Monetary Policy - Humboldt ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Bayesian FAVARs with Agnostic Identification 101<br />
%%%%%%**********************************************************%%%%%<br />
%%%%%% Bayesian FAVAR Code August 26th %%%%%<br />
%%%%%%**********************************************************%%%%%<br />
%%%%%% DO_CALCULATION_GIBBS_SAMPLING_PARAM_PREC_FAC %%%%%<br />
%%%%%% %%%%%<br />
%%%%%% see Sequence Diagram Block B.3.4 %%%%%<br />
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br />
%%%%%% Inference on State Equation<br />
function [param_prec_fac] = DO_CALCULATION_GIBBS_SAMPLING_PARAM_PREC_FAC (input, bk_smoo<strong>the</strong>r);<br />
%function [param_prec_fac] = DO_CALCULATION_GIBBS_SAMPLING_PARAM_PREC_FAC (input, bk_smoo<strong>the</strong>r);<br />
global calculation;<br />
%%%%% set parameters<br />
K = input.specification.model.K;<br />
M = input.specification.dim.M;<br />
T = input.specification.dim.T;<br />
d = input.specification.model.d;<br />
Xsi_S = bk_smoo<strong>the</strong>r.Xsi_S;<br />
%****************************%<br />
% univariate AR OLS %<br />
%****************************%<br />
% At this point we are interested in generating <strong>the</strong> i’th variances:<br />
% Only Sigma Required<br />
for i=1:K+M<br />
end%for<br />
[Phi_i,Phi_ci,vi,Qi(i),invFYFYi]=estvar(Xsi_S(:,i),d,[]);<br />
% At this point we only need <strong>to</strong> save Qi(i) which respectively as<br />
% diagonal elements forms <strong>the</strong> Prior Q_0<br />
Q_0 = diag(Qi); % maybe better diag(Qi(:,:))<br />
Q_prior = Q_0;<br />
Omega_0 = zeros(d*(K+M));%,size(Qmega_0,2));<br />
Omega_0 = diag(kron(1./Qi,1./[1:d])); % Qmega_0 = Q_prior.*Omega_0;<br />
%