Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
4aedf7e9
Commit
4aedf7e9
authored
Mar 09, 2012
by
Stéphane Adjemian
Browse files
Added a commented line to print the effective number of particles if needed.
parent
4ba016cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/particle/sequential_importance_particle_filter.m
View file @
4aedf7e9
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment