simulate_environmentaltransmission_ode: Environmental Transmission model

Description Usage Arguments Details Value Warning Examples

View source: R/simulate_environmentaltransmission_ode.R

Description

An SIR model including environmental transmission

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
simulate_environmentaltransmission_ode(
  S = 10000,
  I = 1,
  R = 0,
  E = 0,
  bd = 1e-04,
  be = 0,
  m = 0,
  n = 0,
  g = 0.2,
  p = 0,
  c = 10,
  tstart = 0,
  tfinal = 100,
  dt = 0.1
)

Arguments

S

: starting value for Susceptible : numeric

I

: starting value for Infected : numeric

R

: starting value for Recovered : numeric

E

: starting value for Environmental Pathogen : numeric

bd

: direct transmission rate : numeric

be

: environmental transmission rate : numeric

m

: births : numeric

n

: natural deaths : numeric

g

: recovery rate : numeric

p

: shedding rate : numeric

c

: decay rate : numeric

tstart

: Start time of simulation : numeric

tfinal

: Final time of simulation : numeric

dt

: Time step : numeric

Details

The model includes susceptible, infected, recovered and environmental compartments.

Value

The function returns the output as a list. The time-series from the simulation is returned as a dataframe saved as list element ts. The ts dataframe has one column per compartment/variable. The first column is time.

Warning

This function does not perform any error checking. So if you try to do something nonsensical (e.g. have negative values for parameters), the code will likely abort with an error message.

Examples

1
2
3
 
# To run the simulation with default parameters:  
result <- simulate_environmentaltransmission_ode() 

DSAIDE documentation built on Jan. 9, 2020, 1:06 a.m.