2008-06-21 10:33:31 +02:00
|
|
|
function B = get_innovation_contemporaneous_impact(type,info)
|
2008-01-17 16:53:58 +01:00
|
|
|
|
|
|
|
% function F = get_innovation_contemporaneous_impact('type')
|
2007-03-20 17:40:33 +01:00
|
|
|
% The approximated reduced form model is
|
|
|
|
%
|
|
|
|
% Y^*_t = Z Y_t [Measure]
|
|
|
|
% Y_t = A*Y_{t-1} + B*E_t [State]
|
|
|
|
%
|
|
|
|
% where Z is an p*m selection matrix (p<=m), Y^* is the p*1 vector of
|
|
|
|
% observable endogenous variables, Y is an m*1 vector of endogeneous
|
|
|
|
% variables, A is an m*m matrix, B is an m*r matrix (r<=m) and E an r*1
|
|
|
|
% vector of structural innovations.
|
|
|
|
%
|
|
|
|
% The contemporaneous is return impact (on the observables) of an innovation is
|
|
|
|
% given by F = Z*B. Matrix F is returned by this function.
|
|
|
|
%
|
|
|
|
% INPUTS
|
2008-06-21 10:33:31 +02:00
|
|
|
% o type [string] "mode","mean"
|
|
|
|
% o info [integer] if equal to 1, matrix B is saved in a mat file.
|
2007-03-20 17:40:33 +01:00
|
|
|
%
|
|
|
|
% OUTPUTS
|
|
|
|
% o F (F is also saved in a file)
|
|
|
|
%
|
|
|
|
% SPECIAL REQUIREMENTS
|
2007-03-20 17:56:16 +01:00
|
|
|
% This function needs to be run after the estimation of a model.
|
2007-03-20 17:40:33 +01:00
|
|
|
%
|
2008-01-17 16:53:58 +01:00
|
|
|
% part of DYNARE, copyright Dynare Team (2006-2008)
|
2007-03-20 17:40:33 +01:00
|
|
|
% Gnu Public License.
|
2008-01-17 16:53:58 +01:00
|
|
|
|
2008-06-21 10:33:31 +02:00
|
|
|
global oo_ M_ bayestopt_ options_
|
2007-03-20 17:40:33 +01:00
|
|
|
|
|
|
|
if nargin == 0
|
|
|
|
type = 'mode';
|
|
|
|
end
|
|
|
|
|
2008-06-21 10:33:31 +02:00
|
|
|
if nargin == 1
|
|
|
|
info = 0;
|
|
|
|
end
|
|
|
|
|
2007-03-20 17:40:33 +01:00
|
|
|
get_posterior_parameters(type);
|
|
|
|
|
2008-06-21 10:33:31 +02:00
|
|
|
[dr,info,M_,options_,oo_]=dr1(oo_.dr,0,M_,options_,oo_);
|
2007-03-20 17:56:16 +01:00
|
|
|
|
|
|
|
B(dr.order_var,M_.exo_names_orig_ord) = dr.ghu*sqrt(M_.Sigma_e);
|
2008-06-21 10:33:31 +02:00
|
|
|
B = B(bayestopt_.mfys,:);
|
2007-03-20 17:40:33 +01:00
|
|
|
|
2008-06-24 20:20:48 +02:00
|
|
|
save([M_.fname '_InnovImpact.mat'],'B');
|