diff --git a/tests/deterministic_simulations/rbc_det_stack_solve_algo_7.mod b/tests/deterministic_simulations/rbc_det_stack_solve_algo_7.mod index 694ea9c17..c1e015dc3 100644 --- a/tests/deterministic_simulations/rbc_det_stack_solve_algo_7.mod +++ b/tests/deterministic_simulations/rbc_det_stack_solve_algo_7.mod @@ -95,10 +95,14 @@ rplot Consumption; rplot Capital; D = load('rbc_det_results'); - -if norm(D.oo_.endo_simul - oo_.endo_simul) > 1e-8; - disp(norm(D.oo_.endo_simul - oo_.endo_simul)); - error(sprintf('rbc_det_stack_solve_algo_7 failed with solve_algo=%u',options_.solve_algo)); +if isoctave && options_.solve_algo==0 + %%acount for somehow weaker convergence criterion in Octave's fsolve + tol_crit=1e-4; +else + tol_crit=1e-8; +end +if norm(D.oo_.endo_simul - oo_.endo_simul) > tol_crit; + disp(norm(D.oo_.endo_simul - oo_.endo_simul)); + error(sprintf('rbc_det_stack_solve_algo_7 failed with solve_algo=%u',options_.solve_algo)); end; - @#endfor \ No newline at end of file diff --git a/tests/kalman/likelihood_from_dynare/fs2000ns_estimation_check.inc b/tests/kalman/likelihood_from_dynare/fs2000ns_estimation_check.inc index bf29060ba..c89016583 100644 --- a/tests/kalman/likelihood_from_dynare/fs2000ns_estimation_check.inc +++ b/tests/kalman/likelihood_from_dynare/fs2000ns_estimation_check.inc @@ -26,7 +26,13 @@ if max(max(abs(SmoothedShocks-repmat(SmoothedShocks(:,:,1),[1,1,2]))))>1e-8 error('SmoothedShocks do not match') end -if max(max(abs(SmoothedVariables-repmat(SmoothedVariables(:,:,1),[1,1,2]))))>1e-8 +if isoctave + tol_crit=5e-6; +else + tol_crit=1e-8; +end + +if max(max(abs(SmoothedVariables-repmat(SmoothedVariables(:,:,1),[1,1,2]))))>tol_crit error('SmoothedVariables do not match') end diff --git a/tests/observation_trends_and_prefiltering/Trend_diagnostics_MCMC_common.inc b/tests/observation_trends_and_prefiltering/Trend_diagnostics_MCMC_common.inc index 0c29608a8..d651671e1 100644 --- a/tests/observation_trends_and_prefiltering/Trend_diagnostics_MCMC_common.inc +++ b/tests/observation_trends_and_prefiltering/Trend_diagnostics_MCMC_common.inc @@ -16,9 +16,15 @@ if mean(abs(oo_.FilteredVariables.Mean.Y_obs(1:end-1)-Y_obs(2:end)'))>1e-3 ||... error('Filtered Variables are wrong') end +if isoctave + tol_crit=3e-2 ; +else + tol_crit=2e-2 ; +end + if abs(corr(oo_.FilteredVariables.Mean.Y_obs(2:end-1)-Y_obs(3:end)',oo_.FilteredVariables.Mean.Y_obs(1:end-2)-Y_obs(2:end-1)'))>2e-2 ||... abs(corr(oo_.FilteredVariables.Mean.P_obs(2:end-1)-P_obs(3:end)',oo_.FilteredVariables.Mean.P_obs(1:end-2)-P_obs(2:end-1)'))>2e-2 ||... - abs(corr(oo_.FilteredVariables.Mean.junk2(2:end-1)-junk2(3:end)',oo_.FilteredVariables.Mean.junk2(1:end-2)-junk2(2:end-1)'))>2e-2 + abs(corr(oo_.FilteredVariables.Mean.junk2(2:end-1)-junk2(3:end)',oo_.FilteredVariables.Mean.junk2(1:end-2)-junk2(2:end-1)'))>tol_crit error('Filtered Variables are wrong') end @@ -30,18 +36,24 @@ if max(abs(squeeze(oo_.FilteredVariablesKStepAhead(1,1,2:end-(options_.nk-1)))-o mean(squeeze(oo_.FilteredVariablesKStepAhead(2,3,3:end-options_.nk)))>1e-1 error('FilteredVariablesKStepAhead is wrong') end + +if isoctave + tol_crit=7e-4; +else + tol_crit=5e-4; +end -if abs(oo_.PointForecast.Mean.Y_obs(end)- y_forecast_100_periods)>5e-4 || abs(oo_.PointForecast.Mean.P_obs(end)- p_forecast_100_periods)>5e-4 +if abs(oo_.PointForecast.Mean.Y_obs(end)- y_forecast_100_periods)>tol_crit || abs(oo_.PointForecast.Mean.P_obs(end)- p_forecast_100_periods)>tol_crit error('Mean Point Forecasts do not match') end -if abs(oo_.PointForecast.Median.Y_obs(end)- y_forecast_100_periods)>5e-4 || abs(oo_.PointForecast.Median.P_obs(end)- p_forecast_100_periods)>5e-4 +if abs(oo_.PointForecast.Median.Y_obs(end)- y_forecast_100_periods)>tol_crit || abs(oo_.PointForecast.Median.P_obs(end)- p_forecast_100_periods)>tol_crit error('Median Point Forecasts do not match') end -if abs(oo_.MeanForecast.Mean.Y_obs(end)- y_forecast_100_periods)>5e-4 || abs(oo_.MeanForecast.Mean.P_obs(end)- p_forecast_100_periods)>5e-4 +if abs(oo_.MeanForecast.Mean.Y_obs(end)- y_forecast_100_periods)>tol_crit || abs(oo_.MeanForecast.Mean.P_obs(end)- p_forecast_100_periods)>tol_crit error('Mean Mean Forecasts do not match') end -if abs(oo_.MeanForecast.Median.Y_obs(end)- y_forecast_100_periods)>5e-4 || abs(oo_.MeanForecast.Median.P_obs(end)- p_forecast_100_periods)>5e-3 +if abs(oo_.MeanForecast.Median.Y_obs(end)- y_forecast_100_periods)>tol_crit || abs(oo_.MeanForecast.Median.P_obs(end)- p_forecast_100_periods)>5e-3 error('Median Mean Forecasts do not match') end