Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 . SIR Disease Model Simulation a ) Write a function in R to simulate epidemics using the discrete time SIR model in Section 2

1. SIR Disease Model Simulation
a) Write a function in R to simulate epidemics using the discrete time SIR model in Section 2.2.2 of the notes.
The function should have inputs which include the population size (N), initial conditions (S0,I0), model parameters (\beta ,\gamma ), and the last time point at which to simulate new cases and removals (\tau ).
Output should include the numbers of individuals contained in the S, I, R, I and R states over time.
Include the function code in your writeup.
b) Use your epidemic function to simulate an epidemic with initial conditions:
S0=995; I0=5; R0=0(so,populationsize,N=1000)
and model parameters:
\beta =0.35; \gamma =0.1
for \tau =60 time points.
Produce plots of both the prevalence curve over time (I) and incidence curve over time (I).
c) We are now going to carry out a Monte Carlo simulation in order to estimate some character- istic of the disease system described by this model. Specifically, we are going to look at the probability that a single infection results in a substantial epidemic, which we will define as more than 50 out of 1000 individuals being infected before the epidemic dies out.
We will use the same parameter values and population size, but change the initial conditions to:
S0=999; I0=1; R0=0.
You can either use your epidemic function, or adapt it if necessary, so that you can run multiple epidemics in order to estimate whether more than 50 individuals are infected before the epidemic dies out.
Try to estimate this probability to 2 decimal places, and provide evidence that your answer is correct to this degree of accuracy.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions