fix indexing bug

time-shift
Houtan Bastani 2018-06-07 18:39:59 +02:00
parent e9c631de7d
commit ec0f5ad701
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ else
% Check that the lhs of candidate ecm equations are at least first differences.
difference_orders_in_error_correction_eq = zeros(m, 1);
for i=1:m
difference_orders_in_error_correction_eq(i) = get_difference_order(M_.var.(var_model_name).lhs(i));
difference_orders_in_error_correction_eq(i) = get_difference_order(M_.var.(var_model_name).lhs(ecm_eqnums(i)));
end
if any(~difference_orders_in_error_correction_eq)
error('Model %s is not a VECM model! LHS variables should be in difference', var_model_name)