1 of 28

Summary and Discussion Lab 6: �MLE fitting of a dynamic model

Reshma Kassanjee and Seth Blumberg

University of Cape Town �SACEMA

MMED 2024

Some slides by Juliet Pulliam

��

000

2 of 28

Goals

  • Understand how to simulate cross-sectional prevalence data around a derived and assumed epidemic trajectory
  • Understand that the likelihood is a function of the hypothesized model parameters (and data-generating process)
  • Understand that “fitting” the dynamic model involves maximizing this likelihood
  • Understand why we transform parameters for fitting
  • Be aware that the choice of optimization algorithms affects the outcome of the optimization
  • Create 95% confidence regions for a multivariate model fit

000

3 of 28

Boxcar model

β × exp(-α×I/N)

000

4 of 28

Lines 1-99

000

5 of 28

5

The ‘true’ prevalence over time

000

6 of 28

6

Simulate prevalence data

000

7 of 28

7

No longer know the true prevalence

🡪 Fit the model to data by estimating unknown parameters by � maximizing the likelihood function (using optimization algorithms)

000

8 of 28

Lines 100-199

000

9 of 28

Boxcar model

β × exp(-α×I/N)

000

10 of 28

β × exp(-α×I/N)

The model world = real world

000

11 of 28

The ‘fitted’ prevalence over time

11

000

12 of 28

Parameter transformations

  • Used log of the parameters when optimizing

Why?

    • Most optimization algorithms assume the inputs are defined on a scale from –∞ to ∞

    • More efficiently explore parameter space

000

13 of 28

Parameter transformations

000

14 of 28

Parameter transformations

000

15 of 28

Optimization algorithms

  • Carefully choose and modify the settings of your optimization algorithms

  • Sometimes you may want to use multiple algorithms (and multiple starting values)

000

16 of 28

Simulated annealing

000

17 of 28

Nelder-Mead optimization

https://codesachin.wordpress.com/2016/01/16/nelder-mead-optimization/

000

18 of 28

Lines 200-318

000

19 of 28

Parameter estimates

19

000

20 of 28

Parameter estimates

20

000

21 of 28

Parameter estimates

21

Uncertainties??

000

22 of 28

Normal distribution

22

000

23 of 28

Likelihood ratio

23

000

24 of 28

Hessian matrix

000

25 of 28

20 vs 80 samples per surveillance study

000

26 of 28

Changing the frequency of surveillance

000

27 of 28

Take-away points

  • Always fit fake data (e.g., simulated by your model) before attempting to fit real data: to validate the fitting approach and identify any errors

  • Think about your optimization algorithms and what they are doing, and choose an approach that will be both efficient and accurate – this may include transforming parameters to scales that span the real numbers

000

28 of 28

This presentation is made available through a Creative Commons Attribution-Noncommercial license. Details of the license and permitted uses are available at� http://creativecommons.org/licenses/by-nc/3.0/

Title: Lab 6 Summary: MLE fitting of a dynamic model to prevalence data

Attribution: Juliet R.C. Pulliam & Reshma Kassanjee & Steve E. Bellan & Seth Blumberg, Clinic on the Meaningful Modeling of Epidemiological Data

Source URL: http://www.ici3d.org/MMED/tutorials/Lab6_summary.pdf

For further information please contact admin@ici3d.org.

000

000

© 2024 International Clinics on Infectious Disease Dynamics and Data

000

000