Skip to content
Snippets Groups Projects
Verified Commit a892d731 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

conditional_forecast: check number controlled exogenous == number of constrained endogenous

parent 4d0854c2
No related branches found
No related tags found
No related merge requests found
...@@ -217,6 +217,10 @@ handles.save_and_go_to_cond_forecast = uicontrol( ... ...@@ -217,6 +217,10 @@ handles.save_and_go_to_cond_forecast = uicontrol( ...
gui_tools.show_warning('You must select at least one exogenous variable') gui_tools.show_warning('You must select at least one exogenous variable')
return return
end end
if sum([handles.endoTable.Data{:, 1}]) ~= sum([handles.exo_table.Data{:, 1}])
gui_tools.show_warning('The number of constrained endogenous variables must be equal to the number of controlled exogenous variables')
return
end
model_settings.conditional_forecast_options.controlled_varexo = handles.exo_table.Data([handles.exo_table.Data{:, 1}], 2); model_settings.conditional_forecast_options.controlled_varexo = handles.exo_table.Data([handles.exo_table.Data{:, 1}], 2);
model_settings.conditional_forecast_options.endo = handles.endoTable.Data([handles.endoTable.Data{:, 1}], 2); model_settings.conditional_forecast_options.endo = handles.endoTable.Data([handles.endoTable.Data{:, 1}], 2);
model_settings.conditional_forecast_options.baseline_file = handles.baseline_file.String; model_settings.conditional_forecast_options.baseline_file = handles.baseline_file.String;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment