v4.1::
+ Removed useless call to check_list_of_variables in dynare_estimation_1.m + Removed bayestopt_ global structure from draw_prior_density.m git-svn-id: https://www.dynare.org/svn/dynare/trunk@2392 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
5f148e90f4
commit
1a9bc8c10d
|
@ -80,7 +80,7 @@ for i=1:npar
|
|||
if TeX
|
||||
TeXNAMES = strvcat(TeXNAMES,texnam);
|
||||
end
|
||||
[x2,f2,abscissa,dens,binf2,bsup2] = draw_prior_density(i);
|
||||
[x2,f2,abscissa,dens,binf2,bsup2] = draw_prior_density(i,bayestopt_);
|
||||
top2 = max(f2);
|
||||
if i <= nvx
|
||||
name = deblank(M_.exo_names(estim_params_.var_exo(i,1),:));
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx);
|
||||
function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx,bayestopt_);
|
||||
% function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx)
|
||||
% Computes values of prior density at many points (before plotting)
|
||||
%
|
||||
% INPUTS
|
||||
% indx: parameter number
|
||||
% indx [integer] Parameter number.
|
||||
% bayestopt_ [structure] Describes the prior beliefs.
|
||||
%
|
||||
% OUTPUTS
|
||||
% x: subset of 'abscissa' such as the density is less than 10
|
||||
% f: subset of 'dens' such as the density is less than 10
|
||||
% abscissa: abscissa
|
||||
% dens: density
|
||||
% binf: first element of x
|
||||
% bsup: last element of x
|
||||
% x [double] Row vector, subset of 'abscissa' such as the density is less than 10
|
||||
% f [double] Row vector, subset of 'dens' such as the density is less than 10
|
||||
% abscissa [double] Row vector, abscissa
|
||||
% dens [double] Row vector, density
|
||||
% binf: [double] Scalar, first element of x
|
||||
% bsup: [double] Scalar, last element of x
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
|
||||
% Copyright (C) 2004-2008 Dynare Team
|
||||
% Copyright (C) 2004-2009 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -33,8 +34,6 @@ function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx);
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
global bayestopt_
|
||||
|
||||
pmean = bayestopt_.pmean;
|
||||
pshape = bayestopt_.pshape;
|
||||
p1 = bayestopt_.p1;
|
||||
|
|
|
@ -31,11 +31,6 @@ function dynare_estimation_1(var_list_,dname)
|
|||
|
||||
global M_ options_ oo_ estim_params_ bayestopt_
|
||||
|
||||
|
||||
%% Build var_list_
|
||||
var_list_ = check_list_of_variables(options_, M_, var_list_);
|
||||
options_.varlist = var_list_;
|
||||
|
||||
options_.lgyidx2varobs = zeros(size(M_.endo_names,1),1);
|
||||
for i = 1:size(M_.endo_names,1)
|
||||
tmp = strmatch(deblank(M_.endo_names(i,:)),options_.varobs,'exact');
|
||||
|
|
|
@ -49,7 +49,7 @@ if nbplt == 1
|
|||
NAMES = [];
|
||||
end
|
||||
for i=1:npar
|
||||
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i);
|
||||
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i,bayestopt_);
|
||||
[nam,texnam] = get_the_name(i,TeX);
|
||||
if TeX
|
||||
TeXNAMES = strvcat(TeXNAMES,texnam);
|
||||
|
@ -93,7 +93,7 @@ else
|
|||
names = [];
|
||||
i = (plt-1)*nstar + index;
|
||||
[nam,texnam] = get_the_name(i,TeX);
|
||||
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i);
|
||||
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i,bayestopt_);
|
||||
if TeX
|
||||
TeXNAMES = strvcat(TeXNAMES,texnam);
|
||||
NAMES = strvcat(NAMES,nam);
|
||||
|
@ -131,7 +131,7 @@ else
|
|||
end
|
||||
for index=1:npar-(nbplt-1)*nstar
|
||||
i = (nbplt-1)*nstar + index;
|
||||
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i);
|
||||
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i,bayestopt_);
|
||||
[nam,texnam] = get_the_name(i,TeX);
|
||||
if TeX
|
||||
TeXNAMES = strvcat(TeXNAMES,texnam);
|
||||
|
|
Loading…
Reference in New Issue