2015-05-19 17:18:47 +02:00
|
|
|
|
|
|
|
if max(abs(oo_.SmoothedVariables.Mean.Y_obs-Y_obs'))>1e-5 ||...
|
|
|
|
max(abs(oo_.SmoothedVariables.Mean.P_obs-P_obs'))>1e-5 || ...
|
|
|
|
max(abs(oo_.SmoothedVariables.Mean.junk2-junk2'))>1e-5
|
|
|
|
error('Smoothed Variables are wrong')
|
|
|
|
end
|
|
|
|
|
|
|
|
if max(abs(oo_.UpdatedVariables.Mean.Y_obs-Y_obs'))>1e-5 ||...
|
|
|
|
max(abs(oo_.UpdatedVariables.Mean.P_obs-P_obs'))>1e-5 || ...
|
|
|
|
max(abs(oo_.UpdatedVariables.Mean.junk2-junk2'))>1e-5
|
|
|
|
error('Updated Variables are wrong')
|
|
|
|
end
|
|
|
|
|
|
|
|
if mean(abs(oo_.FilteredVariables.Mean.Y_obs(1:end-1)-Y_obs(2:end)'))>1e-3 ||...
|
|
|
|
mean(abs(oo_.FilteredVariables.Mean.P_obs(1:end-1)-P_obs(2:end)'))>1e-3
|
|
|
|
error('Filtered Variables are wrong')
|
|
|
|
end
|
|
|
|
|
2016-12-27 20:32:29 +01:00
|
|
|
if isoctave
|
|
|
|
tol_crit=3e-2 ;
|
|
|
|
else
|
|
|
|
tol_crit=2e-2 ;
|
|
|
|
end
|
|
|
|
|
2015-05-19 17:18:47 +02:00
|
|
|
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 ||...
|
2016-12-27 20:32:29 +01:00
|
|
|
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
|
2015-05-19 17:18:47 +02:00
|
|
|
error('Filtered Variables are wrong')
|
|
|
|
end
|
|
|
|
|
|
|
|
if max(abs(squeeze(oo_.FilteredVariablesKStepAhead(1,1,2:end-(options_.nk-1)))-oo_.FilteredVariables.Mean.P_obs))>1e-5 ||...
|
|
|
|
max(abs(squeeze(oo_.FilteredVariablesKStepAhead(1,2,2:end-(options_.nk-1)))-oo_.FilteredVariables.Mean.Y_obs))>1e-5 ||...
|
|
|
|
max(abs(squeeze(oo_.FilteredVariablesKStepAhead(1,3,2:end-(options_.nk-1)))-oo_.FilteredVariables.Mean.junk2))>1e-5 ||...
|
|
|
|
max(abs(squeeze(oo_.FilteredVariablesKStepAhead(2,1,3:end-options_.nk))-oo_.FilteredVariables.Mean.P_obs(3:end)))>1e-2 ||...
|
|
|
|
max(abs(squeeze(oo_.FilteredVariablesKStepAhead(2,2,3:end-options_.nk))-oo_.FilteredVariables.Mean.Y_obs(3:end)))>1e-2 ||...
|
|
|
|
mean(squeeze(oo_.FilteredVariablesKStepAhead(2,3,3:end-options_.nk)))>1e-1
|
|
|
|
error('FilteredVariablesKStepAhead is wrong')
|
|
|
|
end
|
2016-12-27 20:32:29 +01:00
|
|
|
|
|
|
|
if isoctave
|
|
|
|
tol_crit=7e-4;
|
|
|
|
else
|
|
|
|
tol_crit=5e-4;
|
|
|
|
end
|
2015-05-19 17:18:47 +02:00
|
|
|
|
2016-12-27 20:32:29 +01:00
|
|
|
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
|
2015-05-19 17:18:47 +02:00
|
|
|
error('Mean Point Forecasts do not match')
|
|
|
|
end
|
2016-12-27 20:32:29 +01:00
|
|
|
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
|
2015-05-19 17:18:47 +02:00
|
|
|
error('Median Point Forecasts do not match')
|
|
|
|
end
|
|
|
|
|
2016-12-27 20:32:29 +01:00
|
|
|
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
|
2015-05-19 17:18:47 +02:00
|
|
|
error('Mean Mean Forecasts do not match')
|
|
|
|
end
|
2016-12-27 20:32:29 +01:00
|
|
|
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
|
2015-05-19 17:18:47 +02:00
|
|
|
error('Median Mean Forecasts do not match')
|
|
|
|
end
|
|
|
|
|
|
|
|
if abs(mean(oo_.SmoothedShocks.Mean.e_y))>1e-2 || abs(mean(oo_.SmoothedShocks.Mean.e_p))>1e-2 || abs(mean(oo_.SmoothedShocks.Median.e_y))>1e-2 || abs(mean(oo_.SmoothedShocks.Median.e_p))>1e-2
|
|
|
|
error('Residuals are not mean 0')
|
|
|
|
end
|