Answered step by step
Verified Expert Solution
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
SIR Disease Model Simulation
a Write a function in R to simulate epidemics using the discrete time SIR model in Section of the notes.
The function should have inputs which include the population size N initial conditions SI 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:
S; I; Rsopopulationsize,N
and model parameters:
beta ; gamma
for tau 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 out of individuals being infected before the epidemic dies out.
We will use the same parameter values and population size, but change the initial conditions to:
S; I; R
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 individuals are infected before the epidemic dies out.
Try to estimate this probability to 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started