ident_bruteforce.m: remove globals
parent
54e72a4d35
commit
ffaf6c8559
|
@ -1,5 +1,5 @@
|
||||||
function [pars, cosnJ] = ident_bruteforce(J, max_dim_cova_group, TeX, name_tex, tittxt, tol_deriv)
|
function [pars, cosnJ] = ident_bruteforce(dname,fname,J, max_dim_cova_group, TeX, name_tex, tittxt, tol_deriv)
|
||||||
% function [pars, cosnJ] = ident_bruteforce(J,n,TeX, pnames_TeX,tittxt)
|
% [pars, cosnJ] = ident_bruteforce(dname,fname,J, max_dim_cova_group, TeX, name_tex, tittxt, tol_deriv)
|
||||||
% -------------------------------------------------------------------------
|
% -------------------------------------------------------------------------
|
||||||
% given the Jacobian matrix J of moment derivatives w.r.t. parameters
|
% given the Jacobian matrix J of moment derivatives w.r.t. parameters
|
||||||
% computes, for each column of J, the groups of columns from 1 to n that
|
% computes, for each column of J, the groups of columns from 1 to n that
|
||||||
|
@ -20,7 +20,7 @@ function [pars, cosnJ] = ident_bruteforce(J, max_dim_cova_group, TeX, name_tex,
|
||||||
% This function is called by
|
% This function is called by
|
||||||
% * identification_analysis.m
|
% * identification_analysis.m
|
||||||
% =========================================================================
|
% =========================================================================
|
||||||
% Copyright © 2009-2019 Dynare Team
|
% Copyright © 2009-2023 Dynare Team
|
||||||
%
|
%
|
||||||
% This file is part of Dynare.
|
% This file is part of Dynare.
|
||||||
%
|
%
|
||||||
|
@ -38,20 +38,18 @@ function [pars, cosnJ] = ident_bruteforce(J, max_dim_cova_group, TeX, name_tex,
|
||||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||||
% =========================================================================
|
% =========================================================================
|
||||||
|
|
||||||
global M_ options_
|
OutputDirectoryName = CheckPath('identification',dname);
|
||||||
|
|
||||||
OutputDirectoryName = CheckPath('identification',M_.dname);
|
|
||||||
|
|
||||||
totparam_nbr = size(J,2); % number of parameters
|
totparam_nbr = size(J,2); % number of parameters
|
||||||
|
|
||||||
if nargin<2 || isempty(max_dim_cova_group)
|
if nargin<4 || isempty(max_dim_cova_group)
|
||||||
max_dim_cova_group = 4; % max n-tuple
|
max_dim_cova_group = 4; % max n-tuple
|
||||||
end
|
end
|
||||||
if nargin<3 || isempty(TeX)
|
if nargin<5 || isempty(TeX)
|
||||||
TeX = 0; % no Tex output
|
TeX = 0; % no Tex output
|
||||||
tittxt='';
|
tittxt='';
|
||||||
end
|
end
|
||||||
if nargin < 6
|
if nargin < 8
|
||||||
tol_deriv = 1.e-8;
|
tol_deriv = 1.e-8;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -87,7 +85,7 @@ for ll = 1:max_dim_cova_group
|
||||||
end
|
end
|
||||||
dyn_waitbar_close(h);
|
dyn_waitbar_close(h);
|
||||||
if TeX
|
if TeX
|
||||||
filename = [OutputDirectoryName '/' M_.fname '_collin_patterns_',tittxt1,'_' int2str(ll) '.tex'];
|
filename = [OutputDirectoryName '/' fname '_collin_patterns_',tittxt1,'_' int2str(ll) '.tex'];
|
||||||
fidTeX = fopen(filename,'w');
|
fidTeX = fopen(filename,'w');
|
||||||
fprintf(fidTeX,'%% TeX-table generated by ident_bruteforce (Dynare).\n');
|
fprintf(fidTeX,'%% TeX-table generated by ident_bruteforce (Dynare).\n');
|
||||||
fprintf(fidTeX,['%% Collinearity patterns with ',int2str(ll),' parameter(s): ',tittxt,'\n']);
|
fprintf(fidTeX,['%% Collinearity patterns with ',int2str(ll),' parameter(s): ',tittxt,'\n']);
|
||||||
|
|
|
@ -462,7 +462,7 @@ if info(1) == 0 %no errors in solution
|
||||||
|
|
||||||
if advanced
|
if advanced
|
||||||
% here we do not normalize (i.e. we set norm_dMOMENTS=1) as the OLS in ident_bruteforce is very sensitive to norm_dMOMENTS
|
% here we do not normalize (i.e. we set norm_dMOMENTS=1) as the OLS in ident_bruteforce is very sensitive to norm_dMOMENTS
|
||||||
[ide_moments.pars, ide_moments.cosndMOMENTS] = ident_bruteforce(dMOMENTS(ind_dMOMENTS,:), max_dim_cova_group, options_.TeX, options_ident.name_tex, options_ident.tittxt, tol_deriv);
|
[ide_moments.pars, ide_moments.cosndMOMENTS] = ident_bruteforce(M_.dname,M_.fname,dMOMENTS(ind_dMOMENTS,:), max_dim_cova_group, options_.TeX, options_ident.name_tex, options_ident.tittxt, tol_deriv);
|
||||||
end
|
end
|
||||||
|
|
||||||
%here we focus on the unnormalized S and V, which is then used in plot_identification.m and for prior_mc > 1
|
%here we focus on the unnormalized S and V, which is then used in plot_identification.m and for prior_mc > 1
|
||||||
|
|
Loading…
Reference in New Issue