From 7be2f966c3afdf1a10c84684d11c93b1d88edd78 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Mon, 22 Jul 2019 10:09:17 -0600 Subject: [PATCH] dyn_ols: bug fix: sign was not taken into account from AST when endogenous to be subtracted from LHS --- matlab/ols/parse_ols_style_equation.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/ols/parse_ols_style_equation.m b/matlab/ols/parse_ols_style_equation.m index a85a49181..d5eab117d 100644 --- a/matlab/ols/parse_ols_style_equation.m +++ b/matlab/ols/parse_ols_style_equation.m @@ -91,7 +91,7 @@ for i = 1:length(terms) || (strcmp(node_to_parse.type, 'exogenous') && any(strcmp(ds.name, node_to_parse.name))) % Subtract VariableNode from LHS % NB: treat exogenous that exist in ds as endogenous - lhssub = lhssub + evalNode(ds, node_to_parse, line, dseries()); + lhssub = lhssub + evalNode(ds, node_to_parse, line, dseries())*node_sign; else parsing_error('unexpected variable type found', line, node_to_parse); end