Fix bug in identification when estimating only standard deviations

Closes #945
time-shift
Johannes Pfeifer 2015-06-05 18:22:45 +02:00
parent 3ea44d47cf
commit 446b1f6dc1
4 changed files with 28 additions and 12 deletions

View File

@ -19,10 +19,18 @@ function [H, dA, dOm, Hss, gp, d2A, d2Om, H2ss] = getH(A, B, M_,oo_,options_,kro
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if nargin<6 || isempty(kronflag), kronflag = 0; end
if nargin<7 || isempty(indx), indx = [1:M_.param_nbr]; end,
if nargin<8 || isempty(indexo), indexo = []; end,
if nargin<9 || isempty(iv), iv = (1:length(A))'; end,
if nargin<6 || isempty(kronflag)
kronflag = 0;
end
if nargin<7 || isempty(indx)
indx = [];
end
if nargin<8 || isempty(indexo)
indexo = [];
end
if nargin<9 || isempty(iv)
iv = (1:length(A))';
end
[I,J]=find(M_.lead_lag_incidence');
yy0=oo_.dr.ys(I);

View File

@ -17,10 +17,18 @@ function [JJ, H, gam, gp, dA, dOm, dYss] = getJJ(A, B, M_,oo_,options_,kronflag,
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if nargin<7 || isempty(indx), indx = [1:M_.param_nbr];, end,
if nargin<8 || isempty(indexo), indexo = [];, end,
if nargin<10 || isempty(nlags), nlags=3; end,
if nargin<11 || isempty(useautocorr), useautocorr=0; end,
if nargin<7 || isempty(indx)
% indx = [1:M_.param_nbr];
end,
if nargin<8 || isempty(indexo)
indexo = [];
end,
if nargin<10 || isempty(nlags)
nlags=3;
end
if nargin<11 || isempty(useautocorr)
useautocorr=0;
end
% if useautocorr,
warning('off','MATLAB:divideByZero')

View File

@ -118,14 +118,14 @@ if info(1)==0,
ide_strength_J_prior=NaN(1,nparam);
if init, %~isempty(indok),
normaliz = abs(params);
if prior_exist,
if prior_exist,
if ~isempty(estim_params_.var_exo),
normaliz1 = estim_params_.var_exo(:,7); % normalize with prior standard deviation
normaliz1 = estim_params_.var_exo(:,7)'; % normalize with prior standard deviation
else
normaliz1=[];
end
if ~isempty(estim_params_.param_vals),
normaliz1 = [normaliz1; estim_params_.param_vals(:,7)]'; % normalize with prior standard deviation
normaliz1 = [normaliz1 estim_params_.param_vals(:,7)']; % normalize with prior standard deviation
end
% normaliz = max([normaliz; normaliz1]);
normaliz1(isinf(normaliz1)) = 1;

View File

@ -82,7 +82,7 @@ end
ixnoJ = 0;
if rankJ<npar || rankJJ<npar || min(1-McoJ)<1.e-10
if npar>0 && (rankJ<npar || rankJJ<npar || min(1-McoJ)<1.e-10)
% - find out which parameters are involved
% disp('Some parameters are NOT identified by the moments included in J')
% disp(' ')