run_particle_filter: Run particle filter

View source: R/particle.R

run_particle_filterR Documentation

Run particle filter

Description

Create a model, and fit with the particle filter

Usage

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"
)

Arguments

data

to fit to.

squire_model

A squire model to use

model_params

Squire model parameters. Created from a call to one of the parameters_<type>_model functions.

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

Value

Results from particle filter


mrc-ide/squire documentation built on Sept. 10, 2022, 1:11 a.m.