2011-09-14 19:03:56 +02:00
|
|
|
function [nam,texnam] = get_the_name(k,TeX,M_,estim_params_,options_)
|
2008-01-10 16:44:24 +01:00
|
|
|
|
2011-09-14 19:03:56 +02:00
|
|
|
%@info:
|
|
|
|
%! @deftypefn {Function File} {[@var{nam},@var{texnam}] =} get_the_name (@var{k},@var{TeX},@var{M_},@var{estim_params_},@var{options_})
|
|
|
|
%! @anchor{get_the_name}
|
|
|
|
%! @sp 1
|
|
|
|
%! Returns the name of the estimated parameter number @var{k}, following the internal ordering of the estimated parameters.
|
|
|
|
%! @sp 2
|
|
|
|
%! @strong{Inputs}
|
|
|
|
%! @sp 1
|
|
|
|
%! @table @ @var
|
|
|
|
%! @item k
|
|
|
|
%! Integer scalar, parameter number.
|
|
|
|
%! @item TeX
|
|
|
|
%! Integer scalar, if @var{TeX}==0 then @var{texnam} is not returned (empty matrix).
|
|
|
|
%! @item M_
|
|
|
|
%! Matlab's structure describing the model (initialized by @code{dynare}).
|
|
|
|
%! @item estim_params_
|
|
|
|
%! Matlab's structure describing the estimated parameters (initialized by @code{dynare}).
|
|
|
|
%! @item options_
|
|
|
|
%! Matlab's structure describing the options (initialized by @code{dynare}).
|
|
|
|
%! @end table
|
|
|
|
%! @sp 2
|
|
|
|
%! @strong{Outputs}
|
|
|
|
%! @sp 1
|
|
|
|
%! @table @ @var
|
|
|
|
%! @item nam
|
|
|
|
%! String, internal name of the variable
|
|
|
|
%! @item texnam
|
|
|
|
%! String, TeX name of the same variable (if defined in the mod file).
|
|
|
|
%! @end table
|
|
|
|
%! @sp 2
|
|
|
|
%! @strong{This function is called by:}
|
|
|
|
%! @sp 1
|
|
|
|
%! @ref{get_prior_info}, @ref{McMCDiagnostics}, @ref{mode_check}, @ref{PlotPosteriorDistributions}, @ref{plot_priors}
|
|
|
|
%! @sp 2
|
|
|
|
%! @strong{This function calls:}
|
|
|
|
%! @sp 1
|
|
|
|
%! None.
|
|
|
|
%! @end deftypefn
|
|
|
|
%@eod:
|
2008-08-01 14:40:33 +02:00
|
|
|
|
2011-09-14 19:03:56 +02:00
|
|
|
% Copyright (C) 2004-2011 Dynare Team
|
2008-08-01 14:40:33 +02:00
|
|
|
%
|
|
|
|
% This file is part of Dynare.
|
|
|
|
%
|
|
|
|
% Dynare is free software: you can redistribute it and/or modify
|
|
|
|
% it under the terms of the GNU General Public License as published by
|
|
|
|
% the Free Software Foundation, either version 3 of the License, or
|
|
|
|
% (at your option) any later version.
|
|
|
|
%
|
|
|
|
% Dynare is distributed in the hope that it will be useful,
|
|
|
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
% GNU General Public License for more details.
|
|
|
|
%
|
|
|
|
% You should have received a copy of the GNU General Public License
|
|
|
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
2008-01-10 16:44:24 +01:00
|
|
|
|
2005-02-18 20:54:39 +01:00
|
|
|
nam = [];
|
|
|
|
texnam = [];
|
|
|
|
|
2005-09-24 12:36:26 +02:00
|
|
|
nvx = estim_params_.nvx;
|
|
|
|
nvn = estim_params_.nvn;
|
|
|
|
ncx = estim_params_.ncx;
|
2005-09-25 16:10:41 +02:00
|
|
|
ncn = estim_params_.ncn;
|
2005-09-24 12:36:26 +02:00
|
|
|
|
2005-09-24 13:48:17 +02:00
|
|
|
if k <= nvx
|
2005-02-18 20:54:39 +01:00
|
|
|
vname = deblank(M_.exo_names(estim_params_.var_exo(k,1),:));
|
2005-09-24 12:36:26 +02:00
|
|
|
nam = ['SE_',vname];
|
2005-02-18 20:54:39 +01:00
|
|
|
if TeX
|
|
|
|
tname = deblank(M_.exo_names_tex(estim_params_.var_exo(k,1),:));
|
|
|
|
texnam = ['$ SE_{' tname '} $'];
|
|
|
|
end
|
2005-09-24 13:48:17 +02:00
|
|
|
elseif k <= (nvx+nvn)
|
2005-02-18 20:54:39 +01:00
|
|
|
vname = deblank(options_.varobs(estim_params_.var_endo(k-estim_params_.nvx,1),:));
|
|
|
|
nam=['SE_EOBS_',vname];
|
|
|
|
if TeX
|
2010-05-09 20:07:46 +02:00
|
|
|
tname = deblank(M_.endo_names_tex(estim_params_.var_endo(k-estim_params_.nvx,1),:));
|
2005-02-18 20:54:39 +01:00
|
|
|
texnam = ['$ SE_{' tname '} $'];
|
|
|
|
end
|
2005-09-25 16:10:41 +02:00
|
|
|
elseif k <= (nvx+nvn+ncx)
|
|
|
|
jj = k - (nvx+nvn);
|
2005-02-18 20:54:39 +01:00
|
|
|
k1 = estim_params_.corrx(jj,1);
|
|
|
|
k2 = estim_params_.corrx(jj,2);
|
|
|
|
vname = [deblank(M_.exo_names(k1,:)) '_' deblank(M_.exo_names(k2,:))];
|
|
|
|
nam=['CC_',vname];
|
|
|
|
if TeX
|
|
|
|
tname = [deblank(M_.exo_names_tex(k1,:)) ',' deblank(M_.exo_names_tex(k2,:))];
|
|
|
|
texnam = ['$ CC_{' tname '} $'];
|
|
|
|
end
|
2005-09-25 16:10:41 +02:00
|
|
|
elseif k <= (nvx+nvn+ncx+ncn)
|
|
|
|
jj = k - (nvx+nvn+ncx);
|
2005-02-18 20:54:39 +01:00
|
|
|
k1 = estim_params_.corrn(jj,1);
|
|
|
|
k2 = estim_params_.corrn(jj,2);
|
|
|
|
vname = [deblank(M_.endo_names(k1,:)) '_' deblank(M_.endo_names(k2,:))];
|
|
|
|
nam=['CC_EOBS_' vname];
|
|
|
|
if TeX
|
|
|
|
tname = [deblank(M_.endo_names_tex(k1,:)) ',' deblank(M_.endo_names_tex(k2,:))];
|
|
|
|
texnam =['$ CC_{' tname '} $'];
|
|
|
|
end
|
|
|
|
else
|
2011-09-14 19:03:56 +02:00
|
|
|
jj = k - (nvx+nvn+ncx+ncn);
|
2005-09-11 16:20:10 +02:00
|
|
|
jj1 = estim_params_.param_vals(jj,1);
|
|
|
|
nam = deblank(M_.param_names(jj1,:));
|
2005-02-18 20:54:39 +01:00
|
|
|
if TeX
|
2005-09-11 16:20:10 +02:00
|
|
|
texnam = ['$ ' deblank(M_.param_names_tex(jj1,:)) ' $'];
|
2011-09-14 19:03:56 +02:00
|
|
|
end
|
|
|
|
end
|