From b62ec7dc55d12970d2428f4e435645806db01c22 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Thu, 17 Jan 2019 16:44:20 +0100 Subject: [PATCH] handle hard-coded constant*variable in AR(1) --- matlab/ols/parse_ols_style_equation.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matlab/ols/parse_ols_style_equation.m b/matlab/ols/parse_ols_style_equation.m index f9717b2e0..da4d8b0dd 100644 --- a/matlab/ols/parse_ols_style_equation.m +++ b/matlab/ols/parse_ols_style_equation.m @@ -119,7 +119,8 @@ while ~isempty(plus_node) || ~isempty(last_node_to_parse) elseif strcmp(node_to_parse.node_type, 'BinaryOpNode') && strcmp(node_to_parse.op, '*') % Parse param_expr * endog_expr Xtmp = parseTimesNode(ds, node_to_parse, line); - if length(Xtmp.name) > 1 + if length(Xtmp.name) > 1 || ... + (length(Xtmp.name) == 1 && ~isnan(str2double(Xtmp.name))) % Handle constraits % Look through Xtmp names for constant % if found, subtract from LHS