47
Mathematical modeling César V. Munayco, MSc, MPH Doctoral student Department of Preventive Medicine and Biometrics Uniformed University of the Health Sciences

Math modeling

Embed Size (px)

DESCRIPTION

How to do math modeling

Citation preview

Page 1: Math modeling

Mathematical modeling

César V. Munayco, MSc, MPHDoctoral student

Department of Preventive Medicine and BiometricsUniformed University of the Health Sciences

Page 2: Math modeling

Outline• Introduction to mathematical models of

infectious diseases

• How to built a mathematical model

• How to fit a model to data

• Uncertainty and Sensitivity analysis

Page 3: Math modeling

Introduction to mathematical models of infectious diseases

Page 4: Math modeling

Mathematical model. Definition

• The process of applying mathematics to a real world problem with a view of understanding the latter.

• It is a description of a system using mathematical concepts and language. The process of developing a mathematical model is termed mathematical modeling.

Page 5: Math modeling

Why do we need mathematical models in infectious diseases epidemiology?

• Better understand the disease and its population-level dynamics

• Make predictions, explain system behavior

• Evaluate the population-level impact of interventions:

• Vaccination, antibiotic or antiviral treatment

• Quarantine,

• Bednet (ex: malaria),

• Mask (ex: SARS, influenza), …

Thierry Van Effelterre. Mathematical Models in Infectious Diseases Epidemiology and Semi-Algebraic Methods

Page 6: Math modeling

Important concepts• The force of infection is the probability for a susceptible host to acquire the

infection.

• Basic reproduction number (R0) = average number of new infectious cases generated by one primary case during its entire period of infectiousness in a totally susceptible population

• 0< R0 < 1 No invasion of the infection within the population; only small epidemics.

• R0 = 1 Endemic infection.

• R0 >1 The bigger the value of R0 the bigger the potential for spread of the infection within the population.

Page 7: Math modeling

Evaluation of the potential for spread of an infection

Page 8: Math modeling

How to built a mathematical model

Page 9: Math modeling

Process of mathematical modeling

Gerda de Vries. What is mathematical model?Gerda de Vries. What is mathematical model?

Page 10: Math modeling

Two types of models

• Deterministic models: the same input will produce the same output. The only uncertainty in a deterministic model is generated by input variation.

• Stochastic models: model involves some randomness and will not produce the same output given the same input.

Page 11: Math modeling

Deterministic model

• Input factors: parameter values, initial conditions

• The input factors are uncertain due to

• natural variation

• error in measurements

• lack of current measurement techniques

Page 12: Math modeling

Types of component models

e

SS II RR

SS II RREE

SS II RREEMM

SS II RR

SIR

SEIR

MSEIR

SIRS

ß r

ß

ß

ß

r

r

r

π

Page 13: Math modeling

Complex model

Travis C. Porco, Sally M. Blower. Quantifying the Intrinsic Transmission Dynamics of Travis C. Porco, Sally M. Blower. Quantifying the Intrinsic Transmission Dynamics of Tuberculosis. Theoretical Population Biology 54, 117132 (1998)Tuberculosis. Theoretical Population Biology 54, 117132 (1998)

Page 14: Math modeling

Building a model

force ofinfection, λ,

System of ordinary differential equations:

Compartmental model

Page 15: Math modeling

R Coding

Page 16: Math modeling

R Coding

Page 17: Math modeling

Model output – Figure I

Page 18: Math modeling

Model output – Figure II

Page 19: Math modeling

How to fit a model to data

Page 20: Math modeling

Creating a database with real data

Page 21: Math modeling

Data available

Page 22: Math modeling

Model fitting

Page 23: Math modeling

Fitting the model to data

beta=2.4029,gamma=0.9093,

delta=0.4123

Page 24: Math modeling

Uncertainty and Sensitivity analysis

Page 25: Math modeling

Uncertainty(UA) and Sensitivity Analysis (SA)

• The goal of both UA and SA is to determine how influential parameter variation is on the final model output.

• Uncertainty analysis: qualitatively decide which parameters are most influential in the model output

• Sensitivity analysis: quantitatively decide which parameters are most influential in the model output

Marino S, Hogue IB, Ray CJ, Kirschner DE. A methodology for performing global uncertainty and sensitivity analysis in systems biology. J Theor Biol. 2008 Sep 7;254(1):178-96.Anna Mummert. Parameter Sensitivity Analysis for Mathematical Modeling.

Page 26: Math modeling

Uncertainty Analysis• The purpose of UA is to quantify the degree of

confidence in the existing experimental data and parameter estimates.

• Monte Carlo analysis: use the probability distributions for model inputs - separate the parameter space into "equal width" intervals according to the probability distributions and choose one value from each interval.

• Latin hypercube sampling (LHS): LHS allows an un-biased estimate of the average model output, with the advantage that it requires fewer samples than simple random sampling to achieve the same accuracy

Marino S, Hogue IB, Ray CJ, Kirschner DE. A methodology for performing global uncertainty and sensitivity analysis in systems biology. J Theor Biol. 2008 Sep 7;254(1):178-96.

Page 27: Math modeling

Probability Distributions

Page 28: Math modeling

Latin Hypercube Sampling Matrix

Anna Mummert. Parameter Sensitivity Analysis for Mathematical Modeling.Anna Mummert. Parameter Sensitivity Analysis for Mathematical Modeling.

Page 29: Math modeling

Uncertainty range coding for beta

Page 30: Math modeling

Uncertainty range coding for gamma

Page 31: Math modeling

Local uncertainty analysis for beta

Page 32: Math modeling

Local uncertainty analysis for lambda

Page 33: Math modeling

Coding for LHS

Coding for sensitivity function

Page 34: Math modeling

Latin Hypercube Sampling

Page 35: Math modeling

Sensitivity functions

Page 36: Math modeling

MCMC parameter values per iteration

Page 37: Math modeling

Pairs plot of MCMC results

Page 38: Math modeling

Cumulative quantile plot from the MCMC run

Page 39: Math modeling

Sensitivity Analysis• The objective of SA is to identify critical inputs

(parameters and initial conditions) of a model and quantifying how input uncertainty impacts model outcome(s).

• Local sensitivity analysis (LSA): examine change in output values based only on changes in one input factor.

• Global sensitivity analysis (GSA): examine change in output values when all parameter values change.

Marino S, Hogue IB, Ray CJ, Kirschner DE. A methodology for performing global uncertainty and sensitivity analysis in systems biology. J Theor Biol. 2008 Sep 7;254(1):178-96.

Page 40: Math modeling

Global Sensitivity Analysis• Partial rank correlation coefficient (PRCC): used for linear, and

non-linear but monotonic relationships between model inputs and model outputs.

• PRCC provides a measure of monotonicity after the removal of the linear effects of all but one variable.

• Fourier amplitude sensitivity test (FAST): use for nonlinear and non-monotonic relationships between model inputs and model outputs.

• FAST provides a measure of fractional variance accounted for by individual variables and groups of variables.

Marino S, Hogue IB, Ray CJ, Kirschner DE. A methodology for performing global uncertainty and sensitivity analysis in systems biology. J Theor Biol. 2008 Sep 7;254(1):178-96.

Page 41: Math modeling

Coding Partial rank correlation coefficient (PRCC)

Page 42: Math modeling

Partial rank correlation coefficient (PRCC)

Gilles Pujol, Bertrand Iooss, Alexandre Janon. Package ‘sensitivity’

Page 43: Math modeling

Fourier amplitude sensitivity test (FAST)

Marino S, Hogue IB, Ray CJ, Kirschner DE. A methodology for performing global uncertainty and sensitivity analysis in systems biology. J Theor Biol. 2008 Sep 7;254(1):178-96.Anna Mummert. Parameter Sensitivity Analysis for Mathematical Modeling.

Page 44: Math modeling

Marino S, Hogue IB, Ray CJ, Kirschner DE. A methodology for performing global uncertainty and sensitivity analysis in systems biology. J Theor Biol. 2008 Sep 7;254(1):178-96.

Page 45: Math modeling

Conclusion• Always perform a sensitivity analysis on the

parameters.

• Global sensitivity should be performed - examine change in output values when all parameter values change.

• Both partial rank correlation coefficient (linear, non-linear and monotonic) and the Fourier amplitude sensitivity test (non-linear, non-monotonic) should be performed.

Page 46: Math modeling

Programming and examples

• Karline Soetaert. R Package FME : Inverse Modelling, Sensitivity, Monte Carlo - Applied to a Dynamic Simulation Model.

• Aaron A. King. Fitting mechanistic models to epidemic curves via trajectory matching.

• Anonymous. 1978. Influenza in a boarding school. British Medical Journal, 1:587.

Page 47: Math modeling

AcknowledgementAdvisor Dr. Dechang Chen. PhD for reviewing

the PPT

Note: you can find the R code in this link

https://www.dropbox.com/s/hjvts55ntfutxqn/SIRmodelUSUHS.R