Skip to content
Snippets Groups Projects
Commit 5b1ebc82 authored by Michel Juillard's avatar Michel Juillard
Browse files

SWZ: adding new tests and identification/exclusions.m

parent 591e4261
No related branches found
No related tags found
No related merge requests found
function [Ui,Vi,n0,np,ixmC0Pres] = exclusions(nvar,nexo,options_ms)
indxC0Pres = options_ms.cross_restrictions;
nlags = options_ms.nlags;
Qi = options_ms.Qi;
Ri1 = options_ms.Ri;
k = nlags*nvar+1;
Ri = zeros(k,k,nvar);
sR = size(Ri1);
Ri(1:sR(1),1:sR(2),1:sR(3)) = Ri1;
for n=1:nvar
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
end
ixmC0Pres = NaN;
\ No newline at end of file
// same as test_lower_cholesky.mod, but using exclusion syntax
addpath '../../matlab/swz';
var R Pie Y;
model;
Y = 0;
Pie = 0;
R = 0;
end;
varobs Y Pie R;
svar_identification;
exclusion lag 0;
equation 1, Pie, Y;
equation 2, Y;
end;
sbvar(datafile = data,freq=4,initial_year=1959,final_year=2005,nlags=4);
// same as test_upper_cholesky.mod, but with reordered variables. Results must be the same.
addpath '../../matlab/swz';
var R Pie Y;
model;
Y = 0;
Pie = 0;
R = 0;
end;
varobs Y Pie R;
sbvar(datafile = data,freq=4,initial_year=1959,final_year=2005,nlags=4,restriction_fname=lower_cholesky);
// same as test_upper_cholesky.mod, but with reordered variables. Results must be the same.
addpath '../../matlab/swz';
var R Pie Y;
model;
Y = 0;
Pie = 0;
R = 0;
end;
varobs Y Pie R;
svar_identification;
lower_cholesky;
end;
sbvar(datafile = data,freq=4,initial_year=1959,final_year=2005,nlags=4);
// same as test_upper_cholesky.mod, but with reordered variables. Results must be the same.
addpath '../../matlab/swz';
var R Pie Y;
model;
Y = 0;
Pie = 0;
R = 0;
end;
varobs Y Pie R;
sbvar(datafile = data,freq=4,initial_year=1959,final_year=2005,nlags=4,restriction_fname=lower_cholesky);
// same as test_upper_cholesky.mod, but with reordered variables. Results must be the same.
addpath '../../matlab/swz';
var R Pie Y;
model;
Y = 0;
Pie = 0;
R = 0;
end;
varobs Y Pie R;
svar_identification;
lower_cholesky;
end;
markov_switching(chain=1,number_of_states=2,duration=2.5);
svar(variances, chain=1);
ms_sbvar(datafile = data,freq=4,initial_year=1959,final_year=2005,nlags=4,draws_nbr_modified_harmonic_mean=10000);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment