Fixed ec matrix (rules out lag>1).
parent
36388ce28a
commit
00498d19c8
|
@ -143,7 +143,7 @@ end
|
||||||
|
|
||||||
% Initialize matrices
|
% Initialize matrices
|
||||||
oo_.(model_type).(model_name).ar = zeros(length(lhs), length(lhs), max(M_.(model_type).(model_name).max_lag));
|
oo_.(model_type).(model_name).ar = zeros(length(lhs), length(lhs), max(M_.(model_type).(model_name).max_lag));
|
||||||
oo_.(model_type).(model_name).ec = zeros(length(lhs), length(ecRhsVars), max(M_.(model_type).(model_name).max_lag));
|
oo_.(model_type).(model_name).ec = zeros(length(lhs), length(ecRhsVars), 1);
|
||||||
oo_.(model_type).(model_name).ar_idx = lhs;
|
oo_.(model_type).(model_name).ar_idx = lhs;
|
||||||
oo_.(model_type).(model_name).ec_idx = ecRhsVars;
|
oo_.(model_type).(model_name).ec_idx = ecRhsVars;
|
||||||
|
|
||||||
|
@ -165,11 +165,13 @@ for i = 1:length(lhs)
|
||||||
elseif rhsvars{i}.ecRhsIdxs(j) > 0
|
elseif rhsvars{i}.ecRhsIdxs(j) > 0
|
||||||
% Fill EC
|
% Fill EC
|
||||||
[lag, ndiffs] = findLagForVar(var, -rhsvars{i}.lags(j), 0, ecRhsVars);
|
[lag, ndiffs] = findLagForVar(var, -rhsvars{i}.lags(j), 0, ecRhsVars);
|
||||||
if size(oo_.(model_type).(model_name).ec, 3) < lag
|
if lag==1
|
||||||
oo_.(model_type).(model_name).ec(i, rhsvars{i}.ecRhsIdxs(j), lag) = 0;
|
if size(oo_.(model_type).(model_name).ec, 3) < lag
|
||||||
|
oo_.(model_type).(model_name).ec(i, rhsvars{i}.ecRhsIdxs(j), lag) = 0;
|
||||||
|
end
|
||||||
|
oo_.(model_type).(model_name).ec(i, rhsvars{i}.ecRhsIdxs(j), lag) = ...
|
||||||
|
oo_.(model_type).(model_name).ec(i, rhsvars{i}.ecRhsIdxs(j), lag) + g1(i, g1col);
|
||||||
end
|
end
|
||||||
oo_.(model_type).(model_name).ec(i, rhsvars{i}.ecRhsIdxs(j), lag) = ...
|
|
||||||
oo_.(model_type).(model_name).ec(i, rhsvars{i}.ecRhsIdxs(j), lag) + g1(i, g1col);
|
|
||||||
else
|
else
|
||||||
error('Shouldn''t arrive here');
|
error('Shouldn''t arrive here');
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue