0% found this document useful (0 votes)
32 views

"Desolve": E Class (Exposed) - After Infection From Virus, Some of Them Are Asymptotic and Are

The document presents a SEIR model to model the spread of a disease through a population. It defines differential equations to describe the flow of individuals between susceptible (S), exposed (E), infectious (I), asymptomatic (A), quarantined (Q), and recovered (R) compartments. Parameters are defined for rates such as transmission, recovery, quarantine, etc. The model is implemented and simulated in R to generate time series output plotting the size of each compartment over time.

Uploaded by

Keerti Panwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

"Desolve": E Class (Exposed) - After Infection From Virus, Some of Them Are Asymptotic and Are

The document presents a SEIR model to model the spread of a disease through a population. It defines differential equations to describe the flow of individuals between susceptible (S), exposed (E), infectious (I), asymptomatic (A), quarantined (Q), and recovered (R) compartments. Parameters are defined for rates such as transmission, recovery, quarantine, etc. The model is implemented and simulated in R to generate time series output plotting the size of each compartment over time.

Uploaded by

Keerti Panwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

output: word_document: default html_document: default pdf_document: default

install.packages("deSolve", repos = "http://cran.us.r-project.org")

## Installing package into 'C:/Users/Hp/OneDrive/Documents/R/win-library/4.0'


## (as 'lib' is unspecified)

## package 'deSolve' successfully unpacked and MD5 sums checked


##
## The downloaded binary packages are in
## C:\Users\Hp\AppData\Local\Temp\RtmpMn2phc\downloaded_packages

library(deSolve)

## Warning: package 'deSolve' was built under R version 4.0.4

In this model, S (susceptible) is a healthy population which undergo contagion and move to
E class (exposed). After infection from virus, some of them are asymptotic and are
categorised into A group (asymptotic). Others who shows symptoms are moved to I group
(infected). Asymptotic are not showing any visible symptom of the disease and it is much
difficult to identify them. As per study available, SARS CoV-2 virus has a key feature of
asymptotic individuals amounts to 5-80% of the exposed people . We denote this
probability to p. Asymptotic people are assumed to be infectious with reduced (or
enhanced) transmission rate q β 0 . An individual from asymptotic group either shows
symptom after some duration and moves to infected group or remain asymptotic and
recovers from disease. Let γ denote the recovery rate of asymptotic individuals. The
infected may go under treatment with isolation. In this case, they move to recovered group
through Q-group (quarantine/isolation). But some of individuals may not go to isolation
and directly move to recovered group. Let ν denote the recovery rate from infected group
and δ denote recovery rate from quarantine/isolation. The quarantine rate from infected to
isolation group is denoted by α .

Assumptions :
• Dead population is not infectious. Hence the recovered group contains both dead and
recovered people and separated from susceptible after the process.
• Once an individual is recovered from disease, he develops the immunity from the virus
and will not undergo the cycle.

Parameters used:
• λ denotes birth rate of the population and is taken to be = -0.2% per year
• β 0 denotes transmission rate from susceptible to exposed compartment and is taken to
be = 2.5
• q denotes
• μ denotes mortality rate per year and is taken to be = 0.87% per year
• η denotes infection rate for the model
• θ denotes isolation rate of individual
• p denotes probability of exposed people getting infected
• ρ denotes the rate at which asymptotic individuals are infected
• α denotes the quarantine rate from infected to isolation group and is taken to be = 0.9
• ν denotes the recovery rate from infected group and is taken to be = 10/228
• δ denotes recovery rate from quarantine/isolation and is taken to be = 0.03
• γ denotes the recovery rate of asymptotic individuals and is taken to be = 0.5

Mathematically the model is expressed as the following autonomous system:

seir_model = function (current_timepoint, state_values, parameters)


{
# create state variables (local variables)
S = state_values [1]
E = state_values [2]
I = state_values [3]
Q = state_values [4]
A = state_values [5]
R = state_values [6] # recovered
with (
as.list (parameters), # variable names within parameters can be used
{
# compute derivatives
dS = lambda - beta0* (S* (I+q*A)/(N-Q)) - mu*S
dE = beta0* (S* (I + q * A)/( N - Q))- (eta + theta + mu)* E
dI = p*eta*E-(alpha +nu +mu)*I +(rho*A)
dQ = (alpha*I) + (theta*E) - ((delta+mu)*Q)
dA = (1-p)*eta*E - (rho+gamma+mu)*A
dR = gamma*A + delta*Q +nu*I - mu*R

# combine results
results = c (dS, dE, dI, dQ, dA, dR)
list (results)
}
)
}

lambda_value = -0.002/365
mu_value = 0.0087/365
beta0_value = 2.5
p_value = 0.56
q_value = 1
nu_value = 10/228
eta_value = 0.32
theta_value = 0.01
rho_value = 0.5
alpha_value = 0.9
delta_value = 0.03
gamma_value = 0.5

parameter_list = c(lambda = lambda_value, mu = mu_value, beta0 = beta0_value,


p=p_value, q=q_value, nu=nu_value, eta=eta_value, theta=theta_value,
rho=rho_value, gamma = gamma_value, delta = delta_value, alpha=alpha_value)

N=1000
a=N
b=0
c=1
d=0
e=0
f=0

initial_values = c(S=a,E=b,I=c,Q=d,A=e,R=f)

timepoints = seq (0, 50,0.001)

output =lsoda(initial_values, timepoints, seir_model, parameter_list)

plot (S ~ time, data = output, type='l', col = 'blue',xlim=c(0,50))


plot (E ~ time, data = output, type='l', col = 'magenta',xlim=c(0,50))

plot (I ~ time, data = output, type='l', col = 'red')


plot (Q ~ time, data = output, type='l', col = 'green')

plot (A ~ time, data = output, type='l', col = 'green')


plot (R ~ time, data = output, type='l', col = 'green')
# susceptible hosts over time
plot (S ~ time, data = output, type='l', col = 'blue', ylab = 'S, E, I, Q, A,
R', main = 'SEIQAR Model',xlim=c(0,50),ylim=c(0,1200))

# remain on same frame


par (new = TRUE)

# exposed hosts over time


plot (E ~ time, data = output, type='l', col = "green", ylab = '', axes =
FALSE,xlim=c(0,50),ylim=c(0,1200))

# remain on same frame


par (new = TRUE)

# infectious hosts over time


plot (I ~ time, data = output, type='l', col = "red", ylab = '', axes =
FALSE,xlim=c(0,50),ylim=c(0,1200))

# remain on same frame


par (new=TRUE)

#quarantined hosts over time


plot (Q ~ time, data = output, type='l', col = "cyan", ylab = '', axes =
FALSE,xlim=c(0,50),ylim=c(0,1200))

# remain on same frame


par (new = TRUE)

# asymptomatic hosts over time


plot (A ~ time, data = output, type='l', col = "purple", ylab = '', axes =
FALSE,xlim=c(0,50),ylim=c(0,1200))

par (new = TRUE)

# recovered hosts over time


plot (R ~ time, data = output, type='l', col = "yellow", ylab = '', axes =
FALSE,xlim=c(0,50),ylim=c(0,1200))

legend("topright", c("S","E","I","Q","A","R"), cex = 0.8,fill = c("blue",


"green", "red","cyan", "purple","yellow"))
plot (I~S, data = output, type='l', col = 'green')

You might also like