run_particle_filter | R Documentation |
Create a model, and fit with the particle filter
run_particle_filter( data, squire_model, model_params, model_start_date = "2020-02-02", obs_params = list(phi_cases = 0.1, k_cases = 2, phi_death = 1, k_death = 2, exp_noise = 1e+06), n_particles = 1000, forecast_days = 0, save_particles = FALSE, full_output = FALSE, return = "full" )
data |
to fit to. |
squire_model |
A squire model to use |
model_params |
Squire model parameters. Created from a call to one of
the |
model_start_date |
Date to run model simulations from |
obs_params |
List of parameters used for comparing model to data in the particle filter t |
n_particles |
Number of particles |
forecast_days |
Days ahead to include in output |
save_particles |
Whether to save trajectories |
full_output |
Logical, indicating whether the full model output, including the state and the declared outputs are returned. Deafult = FALSE |
return |
Set return depending on what is needed. 'full' gives the entire particle filter output, 'll' gives the log-likelihood, 'sample' gives a sampled particle's trace, 'single' gives the final state |
Results from particle filter
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.