Skip to content
Snippets Groups Projects
Verified Commit 8f47b276 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Merge branch 'online_filter' of git.dynare.org:JohannesPfeifer/dynare

parents e1bdc87f 847eb805
No related branches found
No related tags found
No related merge requests found
...@@ -51,11 +51,26 @@ if DynareOptions.order>1 ...@@ -51,11 +51,26 @@ if DynareOptions.order>1
if BayesInfo.with_trend if BayesInfo.with_trend
error('initial_estimation_checks:: particle filtering does not support trends') error('initial_estimation_checks:: particle filtering does not support trends')
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
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 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 else
if sum(diag(Model.H)>0)<length(DynareOptions.varobs) 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 else
[~,flag]=chol(Model.H); [~,flag]=chol(Model.H);
if flag if flag
...@@ -63,12 +78,6 @@ if DynareOptions.order>1 ...@@ -63,12 +78,6 @@ if DynareOptions.order>1
end end
end 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 end
non_zero_ME=length(EstimatedParameters.H_entries_to_check_for_positive_definiteness); non_zero_ME=length(EstimatedParameters.H_entries_to_check_for_positive_definiteness);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment