


@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:

0001 function [nam,texnam] = get_the_name(k,TeX,M_,estim_params_,options_) 0002 0003 %@info: 0004 %! @deftypefn {Function File} {[@var{nam},@var{texnam}] =} get_the_name (@var{k},@var{TeX},@var{M_},@var{estim_params_},@var{options_}) 0005 %! @anchor{get_the_name} 0006 %! @sp 1 0007 %! Returns the name of the estimated parameter number @var{k}, following the internal ordering of the estimated parameters. 0008 %! @sp 2 0009 %! @strong{Inputs} 0010 %! @sp 1 0011 %! @table @ @var 0012 %! @item k 0013 %! Integer scalar, parameter number. 0014 %! @item TeX 0015 %! Integer scalar, if @var{TeX}==0 then @var{texnam} is not returned (empty matrix). 0016 %! @item M_ 0017 %! Matlab's structure describing the model (initialized by @code{dynare}). 0018 %! @item estim_params_ 0019 %! Matlab's structure describing the estimated parameters (initialized by @code{dynare}). 0020 %! @item options_ 0021 %! Matlab's structure describing the options (initialized by @code{dynare}). 0022 %! @end table 0023 %! @sp 2 0024 %! @strong{Outputs} 0025 %! @sp 1 0026 %! @table @ @var 0027 %! @item nam 0028 %! String, internal name of the variable 0029 %! @item texnam 0030 %! String, TeX name of the same variable (if defined in the mod file). 0031 %! @end table 0032 %! @sp 2 0033 %! @strong{This function is called by:} 0034 %! @sp 1 0035 %! @ref{get_prior_info}, @ref{McMCDiagnostics}, @ref{mode_check}, @ref{PlotPosteriorDistributions}, @ref{plot_priors} 0036 %! @sp 2 0037 %! @strong{This function calls:} 0038 %! @sp 1 0039 %! None. 0040 %! @end deftypefn 0041 %@eod: 0042 0043 % Copyright (C) 2004-2011 Dynare Team 0044 % 0045 % This file is part of Dynare. 0046 % 0047 % Dynare is free software: you can redistribute it and/or modify 0048 % it under the terms of the GNU General Public License as published by 0049 % the Free Software Foundation, either version 3 of the License, or 0050 % (at your option) any later version. 0051 % 0052 % Dynare is distributed in the hope that it will be useful, 0053 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0054 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0055 % GNU General Public License for more details. 0056 % 0057 % You should have received a copy of the GNU General Public License 0058 % along with Dynare. If not, see <http://www.gnu.org/licenses/>. 0059 0060 nam = []; 0061 texnam = []; 0062 0063 nvx = estim_params_.nvx; 0064 nvn = estim_params_.nvn; 0065 ncx = estim_params_.ncx; 0066 ncn = estim_params_.ncn; 0067 0068 if k <= nvx 0069 vname = deblank(M_.exo_names(estim_params_.var_exo(k,1),:)); 0070 nam = ['SE_',vname]; 0071 if TeX 0072 tname = deblank(M_.exo_names_tex(estim_params_.var_exo(k,1),:)); 0073 texnam = ['$ SE_{' tname '} $']; 0074 end 0075 elseif k <= (nvx+nvn) 0076 vname = deblank(options_.varobs(estim_params_.var_endo(k-estim_params_.nvx,1),:)); 0077 nam=['SE_EOBS_',vname]; 0078 if TeX 0079 tname = deblank(M_.endo_names_tex(estim_params_.var_endo(k-estim_params_.nvx,1),:)); 0080 texnam = ['$ SE_{' tname '} $']; 0081 end 0082 elseif k <= (nvx+nvn+ncx) 0083 jj = k - (nvx+nvn); 0084 k1 = estim_params_.corrx(jj,1); 0085 k2 = estim_params_.corrx(jj,2); 0086 vname = [deblank(M_.exo_names(k1,:)) '_' deblank(M_.exo_names(k2,:))]; 0087 nam=['CC_',vname]; 0088 if TeX 0089 tname = [deblank(M_.exo_names_tex(k1,:)) ',' deblank(M_.exo_names_tex(k2,:))]; 0090 texnam = ['$ CC_{' tname '} $']; 0091 end 0092 elseif k <= (nvx+nvn+ncx+ncn) 0093 jj = k - (nvx+nvn+ncx); 0094 k1 = estim_params_.corrn(jj,1); 0095 k2 = estim_params_.corrn(jj,2); 0096 vname = [deblank(M_.endo_names(k1,:)) '_' deblank(M_.endo_names(k2,:))]; 0097 nam=['CC_EOBS_' vname]; 0098 if TeX 0099 tname = [deblank(M_.endo_names_tex(k1,:)) ',' deblank(M_.endo_names_tex(k2,:))]; 0100 texnam =['$ CC_{' tname '} $']; 0101 end 0102 else 0103 jj = k - (nvx+nvn+ncx+ncn); 0104 jj1 = estim_params_.param_vals(jj,1); 0105 nam = deblank(M_.param_names(jj1,:)); 0106 if TeX 0107 texnam = ['$ ' deblank(M_.param_names_tex(jj1,:)) ' $']; 0108 end 0109 end