Learn R Programming

DSAIDE (version 0.8.2)

simulate_parasites_ode: Simulation of a compartmental infectious disease transmission model illustrating parasite infection dynamics with intermediate hosts

Description

This model allows for the simulation of a parasitic infection that requires an intermediate host for transmission

Usage

simulate_parasites_ode(Sh = 1000, Ih = 1, E = 1, Si = 0, Ii = 0,
  tmax = 120, bi = 0.01, be = 0.01, m = 0, n = 0, g = 0,
  w = 0, p = 0.01, c = 0.001)

Arguments

Sh

: initial number of susceptible definitive hosts : numeric

Ih

: initial number of infected definitive hosts : numeric

E

: initial number of pathogens in the environment : numeric

Si

: initial number of susceptible intermediate hosts : numeric

Ii

: initial number of infected intermediate hosts : numeric

tmax

: maximum simulation time : numeric

bi

: rate of transmission from infected intermediate host to susceptible host : numeric

be

: rate of transmission from environment to susceptible intermediate host : numeric

m

: the rate of births of intermediate hosts : numeric

n

: the rate of natural intermediate hosts : numeric

g

: the rate at which infected hosts recover/die : numeric

w

: the rate at which host immunity wanes in host : numeric

p

: rate at which infected host shed the pathogen in the environment : numeric

c

: rate at which the pathogen decays in the environment : numeric

Value

This function returns the simulation result as obtained from a call to the deSolve ode solver.

Warning

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

Details

A compartmental ID model with several states/compartments is simulated as a set of ordinary differential equations. The function returns the output from the odesolver as a matrix, with one column per compartment/variable. The first column is time.

See Also

The UI of the app 'Parasite Model', which is part of the DSAIDE package, contains more details.

Examples

Run this code
# NOT RUN {
  # To run the simulation with default parameters just call the function:
  result <- simulate_parasites_ode()
  # To choose parameter values other than the standard one, 
  # specify the parameters you want to change, e.g. like such:
  result <- simulate_parasites_ode(Sh = 2000, Ih = 10, tmax = 100, g = 0.5)
  # You should then use the simulation result returned from the function, like this:
  plot(result$ts[ , "time"],result$ts[ , "Sh"],xlab='Time',ylab='Number Susceptible',type='l')
# }

Run the code above in your browser using DataLab