math modeling
DESCRIPTION
How to do math modelingTRANSCRIPT
Mathematical modeling
César V. Munayco, MSc, MPHDoctoral student
Department of Preventive Medicine and BiometricsUniformed University of the Health Sciences
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
Introduction to mathematical models of infectious diseases
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.
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
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.
Evaluation of the potential for spread of an infection
How to built a mathematical model
Process of mathematical modeling
Gerda de Vries. What is mathematical model?Gerda de Vries. What is mathematical model?
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.
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
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
eƒ
π
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)
Building a model
force ofinfection, λ,
System of ordinary differential equations:
Compartmental model
R Coding
R Coding
Model output – Figure I
Model output – Figure II
How to fit a model to data
Creating a database with real data
Data available
Model fitting
Fitting the model to data
beta=2.4029,gamma=0.9093,
delta=0.4123
Uncertainty and Sensitivity analysis
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.
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.
Probability Distributions
Latin Hypercube Sampling Matrix
Anna Mummert. Parameter Sensitivity Analysis for Mathematical Modeling.Anna Mummert. Parameter Sensitivity Analysis for Mathematical Modeling.
Uncertainty range coding for beta
Uncertainty range coding for gamma
Local uncertainty analysis for beta
Local uncertainty analysis for lambda
Coding for LHS
Coding for sensitivity function
Latin Hypercube Sampling
Sensitivity functions
MCMC parameter values per iteration
Pairs plot of MCMC results
Cumulative quantile plot from the MCMC run
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.
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.
Coding Partial rank correlation coefficient (PRCC)
Partial rank correlation coefficient (PRCC)
Gilles Pujol, Bertrand Iooss, Alexandre Janon. Package ‘sensitivity’
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.
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.
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.
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.
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