OLS: Octave compatibility fix
Cell arrays cannot be used for derefencing fields in a structure. For some unknown reason, this was nevertheless accepted by MATLAB in this context.time-shift
parent
78fdd50894
commit
2ee03c7e28
|
@ -28,7 +28,7 @@ function ds = dyn_ols(ds, fitted_names_dict, eqtags, model_name, param_names, ds
|
|||
% SPECIAL REQUIREMENTS
|
||||
% dynare must have been run with the option: json=compute
|
||||
|
||||
% Copyright (C) 2017-2020 Dynare Team
|
||||
% Copyright (C) 2017-2021 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -186,7 +186,7 @@ for i = 1:length(Y)
|
|||
oo_.ols.(tag).Yhat = ...
|
||||
feval(fitted_names_dict{idx, 3}, oo_.ols.(tag).Yhat);
|
||||
end
|
||||
ds.(oo_.ols.(tag).Yhat.name) = oo_.ols.(tag).Yhat;
|
||||
ds.(oo_.ols.(tag).Yhat.name{:}) = oo_.ols.(tag).Yhat;
|
||||
|
||||
%% Calculate statistics
|
||||
% Estimate for sigma^2
|
||||
|
@ -233,4 +233,4 @@ for i = 1:length(Y)
|
|||
[oo_.ols.(tag).beta oo_.ols.(tag).tstat oo_.ols.(tag).stderr]);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ function ds = olsgibbs(ds, eqtag, BetaPriorExpectation, BetaPriorVariance, s2, n
|
|||
% SPECIAL REQUIREMENTS
|
||||
% dynare must have been run with the option: json=compute
|
||||
|
||||
% Copyright (C) 2018-2019 Dynare Team
|
||||
% Copyright (C) 2018-2021 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -245,7 +245,7 @@ if any(idx) ...
|
|||
oo_.olsgibbs.(model_name).Yhat = ...
|
||||
feval(fitted_names_dict{idx, 3}, oo_.olsgibbs.(model_name).Yhat);
|
||||
end
|
||||
ds.(oo_.olsgibbs.(model_name).Yhat.name) = oo_.olsgibbs.(model_name).Yhat;
|
||||
ds.(oo_.olsgibbs.(model_name).Yhat.name{:}) = oo_.olsgibbs.(model_name).Yhat;
|
||||
|
||||
% Compute and save posterior densities.
|
||||
for i=1:n
|
||||
|
|
Loading…
Reference in New Issue