Merge branch 'enterprise' into 'enterprise'
Add residuals to olsgibbs function output. See merge request Enterprise/dynare!7time-shift
commit
7f9ba036b7
|
@ -224,9 +224,13 @@ if ~isempty(fitted_names_dict)
|
||||||
yhatname = fitted_names_dict{idx, 2};
|
yhatname = fitted_names_dict{idx, 2};
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
oo_.olsgibbs.(model_name).Yhat = dseries(X*oo_.olsgibbs.(model_name).posterior.mean.beta, fp, yhatname) + lhssub{1};
|
oo_.olsgibbs.(model_name).Yhat = dseries(X*oo_.olsgibbs.(model_name).posterior.mean.beta, fp, yhatname);
|
||||||
|
|
||||||
|
% Residuals
|
||||||
|
oo_.olsgibbs.(model_name).resid = Y - oo_.olsgibbs.(model_name).Yhat.data;
|
||||||
|
|
||||||
% Apply correcting function for Yhat if it was passed
|
% Apply correcting function for Yhat if it was passed
|
||||||
|
oo_.olsgibbs.(model_name).Yhat = oo_.olsgibbs.(model_name).Yhat + lhssub{1};
|
||||||
if any(idx) ...
|
if any(idx) ...
|
||||||
&& length(fitted_names_dict(idx, :)) == 3 ...
|
&& length(fitted_names_dict(idx, :)) == 3 ...
|
||||||
&& ~isempty(fitted_names_dict{idx, 3})
|
&& ~isempty(fitted_names_dict{idx, 3})
|
||||||
|
|
Loading…
Reference in New Issue