diff --git a/matlab/+mom/default_option_mom_values.m b/matlab/+mom/default_option_mom_values.m index 9b390ecb321c06ed306d9cac988ee3784c1468a4..6504af5666c972f1c0a1c86e3584d9ff5ced4ffb 100644 --- a/matlab/+mom/default_option_mom_values.m +++ b/matlab/+mom/default_option_mom_values.m @@ -470,6 +470,6 @@ if options_mom_.mom.analytic_jacobian && ~strcmp(mom_method,'GMM') end if strcmp(options_mom_.mom.mom_method,'IRF_MATCHING') if any(cellfun(@(x) isnumeric(x) && any(x == 13), options_mom_.optimizer_vec)) - error('method_of_moments: lsqnonlin (mode_compute=13) is not yet supported for IRF Matching!'); + error('method_of_moments: lsqnonlin (mode_compute=13) is not yet supported for IRF matching!'); end end \ No newline at end of file diff --git a/matlab/+mom/display_comparison_moments_irfs.m b/matlab/+mom/display_comparison_moments_irfs.m index d363906fcea72541245fd00e78575c21899c4cbb..cdefd80c7f7c8520c7d4d228c377795c21a45322 100644 --- a/matlab/+mom/display_comparison_moments_irfs.m +++ b/matlab/+mom/display_comparison_moments_irfs.m @@ -41,7 +41,7 @@ function display_comparison_moments_irfs(M_, options_mom_, data_moments, model_m if strcmp(options_mom_.mom.mom_method,'IRF_MATCHING') titl = upper('Comparison of matched data irfs and model irfs'); - headers = {'Irf','Data','Model'}; + headers = {'IRF','Data','Model'}; for jm = 1:size(M_.matched_irfs,1) labels{jm,1} = [M_.endo_names{M_.matched_irfs{jm,1}(1)} ' ' M_.exo_names{M_.matched_irfs{jm,1}(2)} ' (' num2str(M_.matched_irfs{jm,1}(3)) ')']; labels_TeX{jm,1} = [M_.endo_names_tex{M_.matched_irfs{jm,1}(1)} ' ' M_.exo_names_tex{M_.matched_irfs{jm,1}(2)} ' (' num2str(M_.matched_irfs{jm,1}(3)) ')']; diff --git a/matlab/+mom/graph_comparison_irfs.m b/matlab/+mom/graph_comparison_irfs.m index b3ba13b13fa4cd92b3eef42ad6fd62b0198ce046..97fab5f03d8a658491d619bf9525b6756f838a4e 100644 --- a/matlab/+mom/graph_comparison_irfs.m +++ b/matlab/+mom/graph_comparison_irfs.m @@ -70,7 +70,7 @@ for jexo = unique_shock_entries' for jvar = 1:length(unique_variables) if jvar==1 || ~( (fig-1)*nstar<jvar && jvar<=fig*nstar ) fig = fig+1; - fig_irf = dyn_figure(nodisplay,'Name',['Irf matching shock to ' exo_names{jexo} ' figure ' int2str(fig)]); + fig_irf = dyn_figure(nodisplay,'Name',['IRF matching shock to ' exo_names{jexo} ' figure ' int2str(fig)]); end plt = jvar-(fig-1)*nstar; data_irf_rows = find(cellfun(@(x) x(1) == unique_variables(jvar) && x(2) == jexo, matched_irfs(:, 1))); diff --git a/matlab/+mom/matched_irfs_blocks.m b/matlab/+mom/matched_irfs_blocks.m index 810b6de110bedd91773b03178d5a1fbb0db2b47b..0f91eed6ed7f92a03cef90722dd354dc4cb215c2 100644 --- a/matlab/+mom/matched_irfs_blocks.m +++ b/matlab/+mom/matched_irfs_blocks.m @@ -15,8 +15,8 @@ function [data_irfs, weight_mat, irf_index, max_irf_horizon] = matched_irfs_bloc % OUTPUT % data_irfs: [matrix] irfs for VAROBS as declared in matched_irfs block % weight_mat: [matrix] weighting matrix for irfs as declared in matched_irfs_weight block -% irf_index: [vector] index for selecting specific irfs from full irf matrix of observables -% max_irf_horizon: [scalar] maximum irf horizon as declared in matched_irfs block +% irf_index: [vector] index for selecting specific irfs from full IRF matrix of observables +% max_irf_horizon: [scalar] maximum IRF horizon as declared in matched_irfs block % ------------------------------------------------------------------------- % This function is called by % o mom.run @@ -40,8 +40,8 @@ function [data_irfs, weight_mat, irf_index, max_irf_horizon] = matched_irfs_bloc % along with Dynare. If not, see <https://www.gnu.org/licenses/>. -max_irf_horizon = max(cellfun(@(x) x(end), matched_irfs(:,1))); % get maximum irf horizon -% create full matrix where 1st dimension are irf periods, 2nd dimension are variables as declared in VAROBS, 3rd dimension are shocks. +max_irf_horizon = max(cellfun(@(x) x(end), matched_irfs(:,1))); % get maximum IRF horizon +% create full matrix where 1st dimension are IRF periods, 2nd dimension are variables as declared in VAROBS, 3rd dimension are shocks. data_irfs = nan(max_irf_horizon,obs_nbr,exo_nbr); % overwrite nan values if they are declared in matched_irfs block; remaining nan values will be later ignored in the matching for jj = 1:size(matched_irfs,1) @@ -52,7 +52,7 @@ for jj = 1:size(matched_irfs,1) irf_value = matched_irfs{jj,2}; if isempty(id_varobs) skipline; - error('method_of_moments: You specified an irf matching involving variable %s, but it is not declared as a varobs!',endo_names{id_var}) + error('method_of_moments: You specified an IRF matching involving variable %s, but it is not declared as a varobs!',endo_names{id_var}) end data_irfs(id_irf_period,id_varobs,id_shock) = irf_value; end @@ -64,11 +64,11 @@ for jj = 1:size(matched_irfs_weight,1) weight_mat_value = matched_irfs_weight{jj,3}; if isempty(id_varobs1) skipline; - error('method_of_moments: You specified a weight for an irf matching involving variable %s, but it is not a varobs!',endo_names{id_var1}) + error('method_of_moments: You specified a weight for an IRF matching involving variable %s, but it is not a varobs!',endo_names{id_var1}) end if isempty(id_varobs2) skipline; - error('method_of_moments: You specified a weight for an irf matching involving variable %s, but it is not a varobs!',endo_names{id_var2}) + error('method_of_moments: You specified a weight for an IRF matching involving variable %s, but it is not a varobs!',endo_names{id_var2}) end idweight_mat1 = sub2ind(size(data_irfs),id_irf_period1,id_varobs1,id_shock1); idweight_mat2 = sub2ind(size(data_irfs),id_irf_period2,id_varobs2,id_shock2); diff --git a/matlab/+mom/objective_function.m b/matlab/+mom/objective_function.m index b7be10f159a4809db7150bcb8182c7dfbaaf1f19..bbef5e322f66934bc8d87cb4823532503bfa9216 100644 --- a/matlab/+mom/objective_function.m +++ b/matlab/+mom/objective_function.m @@ -302,7 +302,7 @@ if strcmp(options_mom_.mom.mom_method,'IRF_MATCHING') && strcmp(options_mom_.mom end end irf_model_varobs = model_irf(:,options_mom_.varobs_id,:); % focus only on observables (this will be used later for plotting) - model_moments = irf_model_varobs(options_mom_.mom.irfIndex); % focus only on selected irf periods + model_moments = irf_model_varobs(options_mom_.mom.irfIndex); % focus only on selected IRF periods end