Question: Write a function in R to simulate epidemics using the discrete time SIR model. The function should have inputs which include the population size (

Write a function in R to simulate epidemics using the discrete time SIR model.
The function should have inputs which include the population size (N), initial conditions (S0,I0) and
model parameters (\beta ,\gamma ).
Find values of the model parameters \beta and \gamma that tend to produce epidemics which peak after 10 time points and have died out by 50 time points in a population of N =1000 and initial conditions S0=999,I0=1(andR0=0ofcourse).
Create plots of the number of new infections (incidence) over time and the number of infectious individuals (prevalence) over time.
Use your function to simulate 100 epidemics using the parameter values you chose above, and show the prevalence curves for these 100 epidemics on a single plot.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!