A basic model with several compartments to model vector-borne transmission
simulate_vectortransmission_ode(Sh = 1000, Ih = 1, Rh = 0,
Sv = 1000, Iv = 1, b1 = 0.002, b2 = 0.002, g = 1, w = 0.1,
m = 100, n = 0.1, tstart = 0, tfinal = 100, dt = 0.1)
: starting value for Susceptible hosts : numeric
: starting value for Infected hosts : numeric
: starting value for Recovered hosts : numeric
: starting value for Susceptible Vectors : numeric
: starting value for Infected Vectors : numeric
: infection rate of hosts : numeric
: infection rate of vectors : numeric
: recovery rate of hosts : numeric
: wanning immunity rate : numeric
: vector birth rate : numeric
: vector death rate : numeric
: Start time of simulation : numeric
: Final time of simulation : numeric
: Time step : numeric
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.
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.
The model tracks the dynamics of susceptible, infected, and recovered hosts, and susceptible and infected vectors. Infection, recovery, and waning immunity processes are implemented for hosts. Births and deaths and infection processes are implemented for vectors. This code is based on a dynamical systems model created by the modelbuilder package. The model is implemented here as a set of ordinary differential equations, using the deSolve package.
# NOT RUN {
# To run the simulation with default parameters:
result <- simulate_vectortransmission_ode()
# }
Run the code above in your browser using DataLab