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 SI and
model parameters beta gamma
Find values of the model parameters beta and gamma that tend to produce epidemics which peak after time points and have died out by time points in a population of N and initial conditions SIandRofcourse
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 epidemics using the parameter values you chose above, and show the prevalence curves for these epidemics on a single plot.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
