SWZ: adding new tests and identification/exclusions.m
parent
591e426110
commit
5b1ebc821c
|
@ -0,0 +1,22 @@
|
||||||
|
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;
|
|
@ -0,0 +1,20 @@
|
||||||
|
// 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);
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
// 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);
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
// 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);
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
// 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);
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
// 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);
|
||||||
|
|
Loading…
Reference in New Issue