Coding the SIR Epidemic Model in MATLAB (2/2)

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • Virginia Tech ME 2004: Coding the SIR Epidemic Model in MATLAB (2/2)
    This is the second of a two-part video sequence on solving a system of 1st order ODEs related to an epidemic in MATLAB. The first video introduced the model and re-cast the system of 1st order ODEs into matrix form. This video implements the model in MATLAB and conducts a mathematical follow-up analysis.
    Blank .m file: bit.ly/Epidemi...
    Master (complete and commented) file: bit.ly/Epidemi...
    Problem statement: bit.ly/Epidemi...

Комментарии • 12

  • @Zizotron
    @Zizotron 4 месяца назад

    I have a question. I tried to increment S0 to 100,000, however, the graph became illogical as all the people became sick in less than one day. I understand this happened because the infection rate is constant. How would we make it so that 'a', the infection rate, is dependent on when people start showing symptoms. Because obviously in a real world scenario, the infection rate isn't constant and people would start showing symptoms days later, therefore people getting sick would be more gradual and not so sudden (even if we increase population size)

    • @jaisohnkimVT
      @jaisohnkimVT  3 месяца назад

      Check out this paper, which is a modification of the SIR Model:
      www.sciencedirect.com/science/article/pii/S2468042720300725
      In particular, it demonstrates that the alpha/beta constants traditionally used in the SIR Model are not actually constant, and a change is proposed to encompass these findings. In essence, the alpha/beta parameters are changed to be a function of the population density, among other things. Perhaps you can make a similar modification.

  • @vaniaelvina
    @vaniaelvina 8 месяцев назад

    is it possible to add noise in the simulation?

    • @jaisohnkimVT
      @jaisohnkimVT  8 месяцев назад

      I haven't tried adding noise to the simulations myself. I will refer you to these pages which may be helpful: www.mathworks.com/matlabcentral/answers/1646055-what-is-the-way-of-solving-the-noise-added-differential-equations-in-matlab, stackoverflow.com/questions/10343868/differential-equation-with-gaussian-noise-matlab

  • @flwerdaaisy
    @flwerdaaisy Год назад

    how can I determine my parameters a and r with lsqnonlin?

    • @jaisohnkimVT
      @jaisohnkimVT  Год назад

      I assume you already have the S, I, and R data and you are attempting to find the a and r parameters which best fit the data. This is off the top of my head so I haven't tested this out at all, but perhaps something like the following might be a useful starting point:
      a_and_r = lsqcurvefit(@sir, initial_parameter_guesses,t,SIRdata,)
      function y = sir(a_and_r,t)
      % set up system of ODEs
      dydt = @(t,y) [-a*y(1)*y(2);
      % ...and so forth]
      % ode45 call
      [~,y] = ode45(dydt,t,initial_SIR_values);
      end

  • @gimanthaupasena740
    @gimanthaupasena740 Год назад

    Hi there, I am doing a project on disease dynamics modelling, your explanation of matlab implementation for disease models is very clear. I am interesting in discussing my model with you so I would like to kindly request an email address to reach out to you. Thank you :)

    • @jaisohnkimVT
      @jaisohnkimVT  Год назад

      Hello, feel free to contact me at jais0hn@vt.edu, but please bear in mind that I cannot offer any consulting, model advice, debugging, etc.

    • @ilyesameraoui74
      @ilyesameraoui74 Год назад

      Hi, I have a question.
      Why when susceptible individuals are equal to recovered individuals the infected individuals are maximum

    • @jaisohnkimVT
      @jaisohnkimVT  Год назад

      The infected population doesn't always peak right when susceptible population = recovered population; it largely depends on the system parameters. I found this website (people.wku.edu/lily.popova.zhuhadar/) useful.