particle_filter | R Documentation |
Run a particle filter
particle_filter( data, model, compare, n_particles, forecast_days = 0, save_particles = FALSE, full_output = FALSE, save_sample_state = FALSE, save_end_states = FALSE )
data |
Data to fit to. This must be constructed with
|
model |
An odin model, used to generate stochastic samples |
compare |
A function to generate log-weights |
n_particles |
Number of particles |
forecast_days |
Number of days to forecast forward from end
states. Requires that |
save_particles |
Logical, indicating if we save full particle histories (this is slower). |
full_output |
Logical, indicating whether the full model output, including the state and the declared outputs are returned. Deafult = FALSE |
save_sample_state |
Logical, indicating whether we should save a single particle, chosen at random, at the final time point for which we have data |
save_end_states |
Logical, indicating whether we should save all particles at the final time point for which we have data |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.