Learn R Programming

epiworldR (version 0.6.1.0)

ModelSIRD: SIRD model

Description

SIRD model

Usage

ModelSIRD(name, prevalence, transmission_rate, recovery_rate, death_rate)

# S3 method for epiworld_sird plot(x, main = get_name(x), ...)

Value

  • The ModelSIRD function returns a model of class epiworld_model.

  • The plot function returns a plot of the SIRD model of class epiworld_model.

Arguments

name

String. Name of the virus

prevalence

Double. Initial proportion of individuals with the virus.

transmission_rate

Numeric scalar between 0 and 1. Virus's rate of infection.

recovery_rate

Numeric scalar between 0 and 1. Rate of recovery_rate from virus.

death_rate

Numeric scalar between 0 and 1. Rate of death from virus.

x

Object of class SIR.

main

Title of the plot

...

Additional arguments passed to graphics::plot.

Details

The initial_states function allows the user to set the initial state of the model. The user must provide a vector of proportions indicating the following values: (1) proportion of non-infected agents already removed, and (2) proportion of non-ifected agents already deceased.

See Also

epiworld-methods

Other Models: ModelDiffNet(), ModelSEIR(), ModelSEIRCONN(), ModelSEIRD(), ModelSEIRDCONN(), ModelSEIRMixing(), ModelSIR(), ModelSIRCONN(), ModelSIRDCONN(), ModelSIRLogit(), ModelSIRMixing(), ModelSIS(), ModelSISD(), ModelSURV(), epiworld-data

Examples

Run this code
model_sird <- ModelSIRD(
  name              = "COVID-19",
  prevalence        = 0.01,
  transmission_rate = 0.9,
  recovery_rate     = 0.1,
  death_rate        = 0.01
)

# Adding a small world population
agents_smallworld(
  model_sird,
  n = 1000,
  k = 5,
  d = FALSE,
  p = .01
)

# Running and printing
run(model_sird, ndays = 100, seed = 1912)
model_sird

# Plotting
plot(model_sird)

Run the code above in your browser using DataLab