SimInf9.8.1 package

A Framework for Data-Driven Stochastic Disease Spread Simulations

SIR-class

Definition of the SIR model

SEIR-class

Definition of the SEIR model

select_matrix-set

Set the select matrix for a SimInf_model object

abc

Approximate Bayesian computation

as.data.frame.SimInf_abc

Coerce to data frame

as.data.frame.SimInf_events

Coerce events to a data frame

as.data.frame.SimInf_indiv_events

Coerce to data frame

boxplot-SimInf_model-method

Box plot of number of individuals in each compartment

C_code

Extract the C code from a SimInf_model object

continue

Run more generations of ABC SMC

distance_matrix

Create a distance matrix between nodes for spatial models

edge_properties_to_matrix

Convert an edge list with properties to a matrix

events

Extract the events from a SimInf_model object

events_SEIR

Example data to initialize events for the SEIR model

events_SIR

Example data to initialize events for the SIR model

events_SIS

Example data to initialize events for the SIS model

events_SISe

Example data to initialize events for the SISe model

gdata-set

Set a global data parameter for a SimInf_model object

gdata

Extract global data from a SimInf_model object

get_individuals

Extract individuals from SimInf_indiv_events

indegree

Determine in-degree for each node in a model

select_matrix

Extract the select matrix from a SimInf_model object

individual_events

Individual events

ldata

Extract local data from a node

logLik-SimInf_pfilter-method

Log likelihood

mparse

Model parser to define new models to run in SimInf

n_generations

Determine the number of generations

n_nodes

Determine the number of nodes in a model

node_events

Transform individual events to node events for a model

outdegree

Determine out-degree for each node in a model

package_skeleton

Create a package skeleton from a SimInf_model

pairs-SimInf_model-method

Scatterplot of number of individuals in each compartment

pfilter

Bootstrap particle filter

plot-SimInf_abc-method

Display the ABC posterior distribution

plot-SimInf_events-method

Display the distribution of scheduled events over time

plot-SimInf_indiv_events-method

Display the distribution of individual events over time

plot-SimInf_pfilter-method

Diagnostic plot of a particle filter object

plot

Display the outcome from a simulated trajectory

SEIR

Create an SEIR model

prevalence-SimInf_model-method

Calculate prevalence from a model object with trajectory data

prevalence-SimInf_pfilter-method

Extract prevalence from running a particle filter

prevalence

Generic function to calculate prevalence from trajectory data

punchcard-set

Set a template for where to record result during a simulation

run

Run the SimInf stochastic simulation algorithm

set_num_threads

Specify the number of threads that SimInf should use

shift_matrix-set

Set the shift matrix for a SimInf_model object

shift_matrix

Extract the shift matrix from a SimInf_model object

show-SimInf_abc-method

Print summary of a SimInf_abc object

show-SimInf_events-method

Brief summary of SimInf_events

show-SimInf_indiv_events-method

Print summary of a SimInf_indiv_events object

show-SimInf_model-method

Brief summary of SimInf_model

show-SimInf_pfilter-method

Brief summary of a SimInf_pfilter object

SimInf

A Framework for Data-Driven Stochastic Disease Spread Simulations

SimInf_abc-class

Class "SimInf_abc"

SimInf_events-class

Class "SimInf_events"

SimInf_events

Create a SimInf_events object

SimInf_indiv_events-class

Class "SimInf_indiv_events"

SimInf_model-class

Class "SimInf_model"

SimInf_model

Create a SimInf_model

SimInf_pfilter-class

Class "SimInf_pfilter"

SIR

Create an SIR model

SIS-class

Definition of the SIS model

SIS

Create an SIS model

SISe-class

Definition of the SISe model

SISe

Create a SISe model

SISe_sp-class

Definition of the SISe_sp model

SISe_sp

Create a SISe_sp model

SISe3-class

Definition of the SISe3 model

SISe3

Create a SISe3 model

SISe3_sp-class

Definition of the SISe3_sp model

SISe3_sp

Create an SISe3_sp model

summary-SimInf_abc-method

Detailed summary of a SimInf_abc object

summary-SimInf_events-method

Detailed summary of a SimInf_events object

summary-SimInf_indiv_events-method

Detailed summary of a SimInf_indiv_events object

summary-SimInf_model-method

Detailed summary of a SimInf_model object

summary-SimInf_pfilter-method

Detailed summary of a SimInf_pfilter object

trajectory-SimInf_model-method

Extract data from a simulated trajectory

trajectory-SimInf_pfilter-method

Extract filtered trajectory from running a particle filter

trajectory

Generic function to extract data from a simulated trajectory

u0-set

Update the initial compartment state u0 in each node

u0

Get the initial compartment state

u0_SEIR

Example data to initialize the SEIR model

u0_SIR

Example data to initialize the SIR model

u0_SIS

Example data to initialize the SIS model

u0_SISe

Example data to initialize the SISe model

v0-set

Update the initial continuous state v0 in each node

Provides an efficient and very flexible framework to conduct data-driven epidemiological modeling in realistic large scale disease spread simulations. The framework integrates infection dynamics in subpopulations as continuous-time Markov chains using the Gillespie stochastic simulation algorithm and incorporates available data such as births, deaths and movements as scheduled events at predefined time-points. Using C code for the numerical solvers and 'OpenMP' (if available) to divide work over multiple processors ensures high performance when simulating a sample outcome. One of our design goals was to make the package extendable and enable usage of the numerical solvers from other R extension packages in order to facilitate complex epidemiological research. The package contains template models and can be extended with user-defined models. For more details see the paper by Widgren, Bauer, Eriksson and Engblom (2019) <doi:10.18637/jss.v091.i12>. The package also provides functionality to fit models to time series data using the Approximate Bayesian Computation Sequential Monte Carlo ('ABC-SMC') algorithm of Toni and others (2009) <doi:10.1098/rsif.2008.0172>.

  • Maintainer: Stefan Widgren
  • License: GPL-3
  • Last published: 2024-06-21