pooled_ols: only save certain variables oo_ structure when passing back to pooled_fgls

time-shift
Houtan Bastani 2019-02-01 11:48:16 +01:00
parent 0121e709fe
commit f4b8735431
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
1 changed files with 6 additions and 7 deletions

View File

@ -95,17 +95,16 @@ end
st = dbstack(1);
if strcmp(st(1).name, 'pooled_fgls')
save_structure_name = 'pooled_fgls';
% Pass vars back to pooled_fgls
oo_.pooled_fgls.residnames = residnames;
oo_.pooled_fgls.Y = Y.data;
oo_.pooled_fgls.X = X.data;
oo_.pooled_fgls.pbeta = X.name;
oo_.pooled_fgls.country_name = country_name;
else
save_structure_name = 'pooled_ols';
end
%% Save
oo_.(save_structure_name).residnames = residnames;
oo_.(save_structure_name).Y = Y.data;
oo_.(save_structure_name).X = X.data;
oo_.(save_structure_name).pbeta = X.name;
oo_.(save_structure_name).country_name = country_name;
%% Estimation
% Estimated Parameters
[q, r] = qr(X.data, 0);