Check measurement error for mode_compute=11

time-shift
Johannes Pfeifer 2021-01-26 09:26:05 +01:00
parent 1fce40ddeb
commit 847eb8050a
1 changed files with 17 additions and 8 deletions

View File

@ -51,11 +51,26 @@ if DynareOptions.order>1
if BayesInfo.with_trend
error('initial_estimation_checks:: particle filtering does not support trends')
end
if DynareOptions.order>2 && DynareOptions.particle.pruning==1
error('initial_estimation_checks:: the particle filter with order>2 does not support pruning')
end
if DynareOptions.particle.pruning~=DynareOptions.pruning
warning('initial_estimation_checks:: the pruning settings differ between the particle filter and the one used for IRFs/simulations. Make sure this is intended.\n')
end
end
if DynareOptions.order>1 || (DynareOptions.order==1 && ~ischar(DynareOptions.mode_compute) && DynareOptions.mode_compute==11)
if DynareOptions.order==1 && DynareOptions.mode_compute==11
disp_string='mode_compute=11';
else
disp_string='particle filtering';
end
if Model.H==0
error('initial_estimation_checks:: particle filtering requires measurement error on the observables')
error('initial_estimation_checks:: %s requires measurement error on the observables',disp_string)
else
if sum(diag(Model.H)>0)<length(DynareOptions.varobs)
error('initial_estimation_checks:: particle filtering requires as many measurement errors as observed variables')
error('initial_estimation_checks:: %s requires as many measurement errors as observed variables',disp_string)
else
[~,flag]=chol(Model.H);
if flag
@ -63,12 +78,6 @@ if DynareOptions.order>1
end
end
end
if DynareOptions.order>2 && DynareOptions.particle.pruning==1
error('initial_estimation_checks:: the particle filter with order>2 does not support pruning')
end
if DynareOptions.particle.pruning~=DynareOptions.pruning
fprintf('initial_estimation_checks:: the pruning settings differ between the particle filter and the one used for IRFs/simulations. Make sure this is intended.\n')
end
end
non_zero_ME=length(EstimatedParameters.H_entries_to_check_for_positive_definiteness);