MoM: Testsuite fixes for Octave
parent
a697002a4e
commit
0a880825a1
|
@ -256,11 +256,13 @@ dev_Q = AndreasenEtAl.Q@{orderApp} - oo_.mom.Q;
|
||||||
dev_datamoments = str2double(AndreasenEtAl.moments@{orderApp}(:,5)) - oo_.mom.data_moments;
|
dev_datamoments = str2double(AndreasenEtAl.moments@{orderApp}(:,5)) - oo_.mom.data_moments;
|
||||||
dev_modelmoments = str2double(AndreasenEtAl.moments@{orderApp}(:,6)) - oo_.mom.model_moments;
|
dev_modelmoments = str2double(AndreasenEtAl.moments@{orderApp}(:,6)) - oo_.mom.model_moments;
|
||||||
|
|
||||||
|
if ~isoctave %there is no table command in Octave
|
||||||
table([AndreasenEtAl.Q@{orderApp} ; str2double(AndreasenEtAl.moments@{orderApp}(:,5)) ; str2double(AndreasenEtAl.moments@{orderApp}(:,6))],...
|
table([AndreasenEtAl.Q@{orderApp} ; str2double(AndreasenEtAl.moments@{orderApp}(:,5)) ; str2double(AndreasenEtAl.moments@{orderApp}(:,6))],...
|
||||||
[oo_.mom.Q ; oo_.mom.data_moments ; oo_.mom.model_moments ],...
|
[oo_.mom.Q ; oo_.mom.data_moments ; oo_.mom.model_moments ],...
|
||||||
[dev_Q ; dev_datamoments ; dev_modelmoments ],...
|
[dev_Q ; dev_datamoments ; dev_modelmoments ],...
|
||||||
'VariableNames', {'Andreasen et al', 'Dynare', 'dev'},...
|
'VariableNames', {'Andreasen et al', 'Dynare', 'dev'},...
|
||||||
'RowNames', ['Q'; strcat('Data_', M_.matched_moments(:,4)); strcat('Model_', M_.matched_moments(:,4))])
|
'RowNames', ['Q'; strcat('Data_', M_.matched_moments(:,4)); strcat('Model_', M_.matched_moments(:,4))])
|
||||||
|
end
|
||||||
|
|
||||||
if norm(dev_modelmoments)> 1e-4
|
if norm(dev_modelmoments)> 1e-4
|
||||||
error('Something wrong in the computation of moments at order @{orderApp}')
|
error('Something wrong in the computation of moments at order @{orderApp}')
|
||||||
|
|
|
@ -257,11 +257,13 @@ dev_Q = AndreasenEtAl.Q@{orderApp} - oo_.mom.Q;
|
||||||
dev_datamoments = str2double(AndreasenEtAl.moments@{orderApp}(:,5)) - oo_.mom.data_moments;
|
dev_datamoments = str2double(AndreasenEtAl.moments@{orderApp}(:,5)) - oo_.mom.data_moments;
|
||||||
dev_modelmoments = str2double(AndreasenEtAl.moments@{orderApp}(:,6)) - oo_.mom.model_moments;
|
dev_modelmoments = str2double(AndreasenEtAl.moments@{orderApp}(:,6)) - oo_.mom.model_moments;
|
||||||
|
|
||||||
|
if ~isoctave %there is no table command in Octave
|
||||||
table([AndreasenEtAl.Q@{orderApp} ; str2double(AndreasenEtAl.moments@{orderApp}(:,5)) ; str2double(AndreasenEtAl.moments@{orderApp}(:,6))],...
|
table([AndreasenEtAl.Q@{orderApp} ; str2double(AndreasenEtAl.moments@{orderApp}(:,5)) ; str2double(AndreasenEtAl.moments@{orderApp}(:,6))],...
|
||||||
[oo_.mom.Q ; oo_.mom.data_moments ; oo_.mom.model_moments ],...
|
[oo_.mom.Q ; oo_.mom.data_moments ; oo_.mom.model_moments ],...
|
||||||
[dev_Q ; dev_datamoments ; dev_modelmoments ],...
|
[dev_Q ; dev_datamoments ; dev_modelmoments ],...
|
||||||
'VariableNames', {'Andreasen et al', 'Dynare', 'dev'},...
|
'VariableNames', {'Andreasen et al', 'Dynare', 'dev'},...
|
||||||
'RowNames', ['Q'; strcat('Data_', M_.matched_moments(:,4)); strcat('Model_', M_.matched_moments(:,4))])
|
'RowNames', ['Q'; strcat('Data_', M_.matched_moments(:,4)); strcat('Model_', M_.matched_moments(:,4))])
|
||||||
|
end
|
||||||
|
|
||||||
if norm(dev_modelmoments)> 1e-4
|
if norm(dev_modelmoments)> 1e-4
|
||||||
warning('Something wrong in the computation of moments at order @{orderApp}')
|
warning('Something wrong in the computation of moments at order @{orderApp}')
|
||||||
|
|
|
@ -256,11 +256,13 @@ dev_Q = AndreasenEtAl.Q@{orderApp} - oo_.mom.Q;
|
||||||
dev_datamoments = str2double(AndreasenEtAl.moments@{orderApp}(:,5)) - oo_.mom.data_moments;
|
dev_datamoments = str2double(AndreasenEtAl.moments@{orderApp}(:,5)) - oo_.mom.data_moments;
|
||||||
dev_modelmoments = str2double(AndreasenEtAl.moments@{orderApp}(:,6)) - oo_.mom.model_moments;
|
dev_modelmoments = str2double(AndreasenEtAl.moments@{orderApp}(:,6)) - oo_.mom.model_moments;
|
||||||
|
|
||||||
|
if ~isoctave %there is no table command in Octave
|
||||||
table([AndreasenEtAl.Q@{orderApp} ; str2double(AndreasenEtAl.moments@{orderApp}(:,5)) ; str2double(AndreasenEtAl.moments@{orderApp}(:,6))],...
|
table([AndreasenEtAl.Q@{orderApp} ; str2double(AndreasenEtAl.moments@{orderApp}(:,5)) ; str2double(AndreasenEtAl.moments@{orderApp}(:,6))],...
|
||||||
[oo_.mom.Q ; oo_.mom.data_moments ; oo_.mom.model_moments ],...
|
[oo_.mom.Q ; oo_.mom.data_moments ; oo_.mom.model_moments ],...
|
||||||
[dev_Q ; dev_datamoments ; dev_modelmoments ],...
|
[dev_Q ; dev_datamoments ; dev_modelmoments ],...
|
||||||
'VariableNames', {'Andreasen et al', 'Dynare', 'dev'},...
|
'VariableNames', {'Andreasen et al', 'Dynare', 'dev'},...
|
||||||
'RowNames', ['Q'; strcat('Data_', M_.matched_moments(:,4)); strcat('Model_', M_.matched_moments(:,4))])
|
'RowNames', ['Q'; strcat('Data_', M_.matched_moments(:,4)); strcat('Model_', M_.matched_moments(:,4))])
|
||||||
|
end
|
||||||
|
|
||||||
if norm(dev_modelmoments)> 1e-4
|
if norm(dev_modelmoments)> 1e-4
|
||||||
warning('Something wrong in the computation of moments at order @{orderApp}')
|
warning('Something wrong in the computation of moments at order @{orderApp}')
|
||||||
|
|
|
@ -88,8 +88,13 @@ end;
|
||||||
|
|
||||||
estimated_params_init(use_calibration);
|
estimated_params_init(use_calibration);
|
||||||
end;
|
end;
|
||||||
%1 3 13
|
|
||||||
@#for optimizer in [1, 3, 13]
|
@#for optimizer in [1, 3, 13]
|
||||||
|
@#if estimParams == 2 && optimizer == 13
|
||||||
|
%skip due to buggy behavior in Octave
|
||||||
|
if ~isoctave
|
||||||
|
@#endif
|
||||||
|
|
||||||
method_of_moments(
|
method_of_moments(
|
||||||
mom_method = GMM % method of moments method; possible values: GMM|SMM
|
mom_method = GMM % method of moments method; possible values: GMM|SMM
|
||||||
, datafile = 'RBC_Andreasen_Data_2.mat' % name of filename with data
|
, datafile = 'RBC_Andreasen_Data_2.mat' % name of filename with data
|
||||||
|
@ -110,6 +115,11 @@ end;
|
||||||
, silent_optimizer % run minimization of moments distance silently without displaying results or saving files in between
|
, silent_optimizer % run minimization of moments distance silently without displaying results or saving files in between
|
||||||
, analytic_jacobian
|
, analytic_jacobian
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@#if estimParams == 2 && optimizer == 13
|
||||||
|
%skip due to buggy behavior in Octave
|
||||||
|
end
|
||||||
|
@#endif
|
||||||
@#endfor
|
@#endfor
|
||||||
|
|
||||||
@#endfor
|
@#endfor
|
|
@ -118,6 +118,12 @@ options_.solveopt.TolXConstraint=1e-3;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@#for optimizer in OPTIMIZERS
|
@#for optimizer in OPTIMIZERS
|
||||||
|
|
||||||
|
@#if estimParams == 2 && optimizer == 13
|
||||||
|
%skip due to buggy behavior in Octave
|
||||||
|
if ~isoctave
|
||||||
|
@#endif
|
||||||
|
|
||||||
method_of_moments(
|
method_of_moments(
|
||||||
mom_method = GMM % method of moments method; possible values: GMM|SMM
|
mom_method = GMM % method of moments method; possible values: GMM|SMM
|
||||||
, datafile = 'RBC_Andreasen_Data_2.mat' % name of filename with data
|
, datafile = 'RBC_Andreasen_Data_2.mat' % name of filename with data
|
||||||
|
@ -139,6 +145,11 @@ options_.solveopt.TolXConstraint=1e-3;
|
||||||
@#endif
|
@#endif
|
||||||
%, silent_optimizer % run minimization of moments distance silently without displaying results or saving files in between
|
%, silent_optimizer % run minimization of moments distance silently without displaying results or saving files in between
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@#if estimParams == 2 && optimizer == 13
|
||||||
|
%skip due to buggy behavior in Octave
|
||||||
|
end
|
||||||
|
@#endif
|
||||||
@#endfor
|
@#endfor
|
||||||
@#endfor
|
@#endfor
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue