# Table of Contents
# Pre
Pre-made models for disease outbreaks.
Import it with:
const pre = require('@epispot/epijs').pre
# sir
The SIR Model. Returns a chart.js graph with the total Susceptible, Infected, and Recovered after the given amount of time.
# Parameters
rnNumber (opens new window) R Naught, or the amount of people one infected infects whlie infected.sNumber (opens new window) The Susceptible population at the beggining of the outbreakiNumber (opens new window) The Infected population at the beggining of th outbreaktimeNumber (opens new window) The time the total simulation lasts.uNumber (opens new window) The recovery ratepNumber (opens new window) The total population.stochasticBoolean (opens new window) Whether to make the model stochastic or not.
# Examples
sir(4, 9999, 1, 100, 1/21, 10000, true)
Returns any The data for the model as a list.
# seir
The SEIR Model. Returns a chart.js graph with the total Susceptible, Exposed, Infected, and Recovered after the given amount of time.
# Parameters
rnNumber (opens new window) R Naught, or the amount of people one infected infects whlie infected.sNumber (opens new window) The Susceptible population at the beggining of the outbreakiNumber (opens new window) The Infected population at the beggining of th outbreaktNumber (opens new window) The time the total simulation lasts.uNumber (opens new window) The recovery rateaNumber (opens new window) The incubation periodpNumber (opens new window) The total population.stochasticBoolean (opens new window) Whether to make the model stochastic or not.
# Examples
seir(4, 9999, 1, 100, 1/7, 1/7, 10000, true)
Returns any The data for the model as a list.
# seird
The SEIRD Model. Returns a chart.js graph with the total Susceptible, Exposed, Infected, Recovered, and Dead populations after the given amount of time.
# Parameters
rnNumber (opens new window) R Naught, or the amount of people one infected infects whlie infected.sNumber (opens new window) The Susceptible population at the beggining of the outbreakiNumber (opens new window) The Infected population at the beggining of the outbreaktNumber (opens new window) The time the total simulation lasts.uNumber (opens new window) The recovery rateaNumber (opens new window) The incubation perioddNumber (opens new window) The death ratepNumber (opens new window) The total population.stochasticBoolean (opens new window) Whether to make the model stochastic or not.
# Examples
seird(4, 99999, 1, 100, 1/21, 1/14, 1/100, 10000, true)
Returns any The data for the model as a list.
# seihrd
The SEIHRD Model. Returns a chart.js graph with the total Susceptible, Exposed, Infected, Hospitalized, Recovered, and Dead populations after the given amount of time.
# Parameters
rnNumber (opens new window) R Naught, or the amount of people one infected infects whlie infected.sNumber (opens new window) The Susceptible population at the beggining of the outbreakiNumber (opens new window) The Infected population at the beggining of the outbreaktNumber (opens new window) The time the total simulation lasts.uNumber (opens new window) The recovery rate for the infected populationuhNumber (opens new window) The recovery rate for the hospitalized populationaNumber (opens new window) The incubation perioddiNumber (opens new window) The death rate for the infected populationdhNumber (opens new window) The death rate for the hospitalized populationhNumber (opens new window) The hospitalization ratepNumber (opens new window) The total population.stochasticBoolean (opens new window) Whether to make the model stochastic or not.
# Examples
seihrd(4, 9999, 1, 265, 1/21, 1/40, 1/14, 1/100, 1/20, 1/30, 10000, true)
Returns any The data for the model as a list.
# seihcrd
The SEIHCRD Model. Returns a chart.js graph with the total Susceptible, Exposed, Infected, Hospitalized, Critical, Recovered, and Dead populations after the given amount of time.
# Parameters
rnNumber (opens new window) R Naught, or the amount of people one infected infects whlie infected.sNumber (opens new window) The Susceptible population at the beggining of the outbreakiNumber (opens new window) The Infected population at the beggining of the outbreaktNumber (opens new window) The time the total simulation lasts.uNumber (opens new window) The recovery rate for the infected populationuhNumber (opens new window) The recovery rate for the hospitalized populationaNumber (opens new window) The incubation perioddiNumber (opens new window) The death rate for the infected populationdhNumber (opens new window) The death rate for the hospitalized populationchNumber (opens new window) The rate at which patients go to the critical stage from the hospitalized compartment.ciNumber (opens new window) The rate at which patients go to the critical stage from the infected compartemnt.dcNumber (opens new window) The death rate for critical patientsucNumber (opens new window) The recovery rate for critical patientshcNumber (opens new window) The rate at which a critical patient goes to the hospitalized compartment, and are no longer critical.icNumber (opens new window) The rate at which a critical patient goes to the infected compartment, and are no longer critical.hNumber (opens new window) The hospitalization ratepNumber (opens new window) The total population.stochasticBoolean (opens new window) Whether to make the model stochastic or not.
# Examples
seihcrd(4, 9999, 1, 265, 1/21, 1/40, 1/14, 1/100, 1/20, 1/10, 1/40, 2/5, 1/5, 1/5, 1/5, 1/30, 10000, true)
Returns any The data for the model as a list.