18.06.2013 Views

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 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Bayesian FAVARs with Agnostic Identification 105<br />

spec_nBC = length(input.specification.IRA.BC);<br />

for bc_i = 1:spec_nBC;<br />

end;<br />

nsteps = input.specification.IRA.nsteps;<br />

scale = calculation.IRA.scale;<br />

specDraws = input.specification.model.draws;<br />

specAlphaDraws = input.specification.IRA.alpha_draws;<br />

ira.finalresponses(bc_i).no = size(ira.finalresponses(bc_i).response,3);<br />

%GLOG (sprintf(’Accepted Responses for BC-%d: %d’,bc_i, ira.finalresponses(bc_i).no),1);<br />

% transform back <strong>to</strong> levels<br />

for i=1:size(ira.finalresponses(bc_i).response,1);<br />

end;<br />

if input.specification.IRA.var_index_sr(i,2)==4<br />

ira.finalresponses(bc_i).response(i,:,:) =...<br />

exp(ira.finalresponses(bc_i).response(i,:,:))-ones(1, nsteps,ira.finalresponses(bc_i).no);<br />

elseif input.specification.IRA.var_index_sr(i,2)==5<br />

end<br />

ira.finalresponses(bc_i).response(i,:,:) = ...<br />

exp(cumsum(ira.finalresponses(bc_i).response(i,:,:),2))-ones(1,...<br />

% FINAL RESPONSES<br />

nsteps,ira.finalresponses(bc_i).no);<br />

ira.finalresponses(bc_i).response = sort(ira.finalresponses(bc_i).response,3);<br />

ira.finalresponses(bc_i).fimpResponse = median(ira.finalresponses(bc_i).response,3);<br />

if ira.finalresponses(bc_i).no > 0<br />

end;<br />

% ERROR BANDS<br />

ira.finalresponses(bc_i).lowerErrorBand = ira.finalresponses(bc_i).response(:,:,floor(0.16*ira.finalresponses(bc_i).no));<br />

ira.finalresponses(bc_i).upperErrorBand = ira.finalresponses(bc_i).response(:,:,floor(0.84*ira.finalresponses(bc_i).no));<br />

% concatenate <strong>the</strong> estimate and confidence bounds<br />

ira.finalresponses(bc_i).collRespMat =...<br />

cat(3,ira.finalresponses(bc_i).lowerErrorBand, ...<br />

ira.finalresponses(bc_i).fimpResponse, ...<br />

ira.finalresponses(bc_i).upperErrorBand);<br />

% transform scale <strong>to</strong> std<br />

ira.finalresponses(bc_i).collRespMat =...<br />

ira.finalresponses(bc_i).collRespMat ./ repmat(scale’,[1 nsteps 3]) ;<br />

%%%%%%**********************************************************%%%%%<br />

%%%%%% Bayesian FAVAR Code August 26th %%%%%<br />

%%%%%%**********************************************************%%%%%

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!