Commit 4aedf7e9 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Added a commented line to print the effective number of particles if needed.

parent 4ba016cc
......@@ -130,6 +130,7 @@ for t=1:sample_size
wtilde = weights.*exp(lnw-dfac);
lik(t) = log(mean(wtilde))+dfac;
weights = wtilde/sum(wtilde);
% sum(weights>max(weights)*1e-6)
Neff = 1/(weights*weights');
if (Neff<DynareOptions.particle.resampling.neff_threshold*sample_size && strcmpi(DynareOptions.particle.resampling.status,'generic')) || strcmpi(DynareOptions.particle.resampling.status,'systematic')
nb_obs_resamp = nb_obs_resamp+1 ;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment