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

Fixed bug related to the shape of the weights vector in paricle filter with pruning.

parent 08feada8
......@@ -156,8 +156,8 @@ for t=1:sample_size
if (strcmp(DynareOptions.particle.resampling.status,'generic') && neff(weights)<DynareOptions.particle.resampling.neff_threshold*sample_size ) || ...
strcmp(DynareOptions.particle.resampling.status,'systematic')
if pruning
temp = resample([tmp(mf0,:)' tmp_(mf0,:)'],weights,DynareOptions);
StateVectors = temp(:,1:number_of_state_variables)' ;
temp = resample([tmp(mf0,:)' tmp_(mf0,:)'],weights',DynareOptions);
StateVectors = temp(:,1:number_of_state_variables)';
StateVectors_ = temp(:,number_of_state_variables+1:2*number_of_state_variables)';
else
StateVectors = resample(tmp(mf0,:)',weights',DynareOptions)';
......
Markdown is supported
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