dyn_ols: fix bug in assignment to M_.params
parent
7e4f5abfa5
commit
34cf18a96a
|
@ -75,7 +75,6 @@ end
|
||||||
M_endo_exo_names_trim = [M_.endo_names; M_.exo_names];
|
M_endo_exo_names_trim = [M_.endo_names; M_.exo_names];
|
||||||
regex = strjoin(M_endo_exo_names_trim(:,1), '|');
|
regex = strjoin(M_endo_exo_names_trim(:,1), '|');
|
||||||
mathops = '[\+\*\^\-\/\(\)]';
|
mathops = '[\+\*\^\-\/\(\)]';
|
||||||
M_param_names_trim = cellfun(@strtrim, num2cell(M_.param_names,2), 'UniformOutput', false);
|
|
||||||
for i = 1:length(lhs)
|
for i = 1:length(lhs)
|
||||||
%% Construct regression matrices
|
%% Construct regression matrices
|
||||||
rhs_ = strsplit(rhs{i}, {'+','-','*','/','^','log(','exp(','(',')'});
|
rhs_ = strsplit(rhs{i}, {'+','-','*','/','^','log(','exp(','(',')'});
|
||||||
|
@ -181,7 +180,7 @@ for i = 1:length(lhs)
|
||||||
xpxi = (r'*r)\eye(nvars);
|
xpxi = (r'*r)\eye(nvars);
|
||||||
oo_.ols.(tags{i}).beta = r\(q'*Y.data);
|
oo_.ols.(tags{i}).beta = r\(q'*Y.data);
|
||||||
for j = 1:length(pnames)
|
for j = 1:length(pnames)
|
||||||
M_.params(strcmp(M_param_names_trim, pnames{j})) = oo_.ols.(tags{i}).beta(j);
|
M_.params(strcmp(M_.param_names, pnames{j})) = oo_.ols.(tags{i}).beta(j);
|
||||||
end
|
end
|
||||||
|
|
||||||
% Yhat
|
% Yhat
|
||||||
|
|
Loading…
Reference in New Issue