run_infectiousdisease_model: Run infectious disease models models

View source: R/infectious_disease_dynamics.R

run_infectiousdisease_modelR Documentation

Run infectious disease models models

Description

Run infectious disease models models

Usage

run_infectiousdisease_model(time, init, params, model_type)

Arguments

time

vector of time units over which to run model

init

initial population size of population

params

vector of beta (infection rate), m (natural birth/death rate), and gamma (recovery rate)

model_type

which type of model to run? (should be one of SIR, SIR_ft, SEIR, SEIR_ft, SIRD, SIRD_ft, SIS, or SIS_ft)

See Also

plot_infectiousdisease_time() to plot trajectories over time, and plot_infectiousdisease_portrait() to plot pairwise portrait diagrams

Examples

# Run the SIR model
params_vec <- c(m = .1, beta = .01, v = .2, gamma = 0)
init_vec <- c(S = 100, I = 1, R = 0)
time_vec <- seq(0, 10, 0.1)
run_infectiousdisease_model(time = time_vec, init = init_vec, params =
params_vec, model_type = "SIR")

gauravsk/ecoevoapps documentation built on July 9, 2024, 9:37 p.m.