dynamic models paul j. hurtado mathematical biosciences institute (mbi), the ohio state university...

21
Dynamic Models Paul J. Hurtado http://www.pauljhurtado.com/ Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Upload: cordelia-jacobs

Post on 18-Jan-2018

217 views

Category:

Documents


0 download

DESCRIPTION

Dynamic Models and Data

TRANSCRIPT

Page 1: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Dynamic ModelsPaul J. Hurtado

http://www.pauljhurtado.com/Mathematical Biosciences Institute

(MBI),The Ohio State University

19 May 2014 (Monday p.m.)

Page 2: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Classic (Linear) vs Dynamic Models

I. Incorporating Stochasticity• Observation/Extrinsic• Process/Intrinsic (both)

II. Common Statistical Endeavors• Parameter estimation• Uncertainty quantification• Diagnostic tests (check assumptions)• Model selection and comparison • Descriptive Statistics• Tests vs. “Brute Force” Approaches?

III. Computer Lab• Resources: (http://www.pauljhurtado.com/docs/nimbios14)• Part I:• Simple regression in R • Uncertainty quantification• Model Selection (AIC,BIC)• Diagnostics

• Part II: Adding Stochasticity• Adding observation noise• Stochastic Simulation Algorithm (Gillespie)

Page 3: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Dynamic Models and Data

Page 4: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Real data are “noisy”!

Page 5: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Source of stochasticity?

Process Noise

The state transitions are stochastic:

N(t+Δt) = f(N(t)) + εt

Y(t) = N(t)

Observation Noise

Observations of states are stochastic:

N(t+Δt) = f(N(t))

Y(t) = N(t) + εt

Page 6: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Adding StochasticityProcess Noise

Original Model:dN/dt = f(N)

Discretize + noise:N(t+Δt) = N(t) + f(N)Δt

+ εt

Observations/Data:Y(t) = N(t)

Observation Noise

Original Model:dN/dt = f(N)

Simulate + noise:

Observations/Data:Y(t) = N(t) + εt

Page 7: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Adding StochasticityProcess Noise #1Original Model:

dN/dt = rN

Rederive your model: N(t+Δt) = N(t) +

rbinom(rΔt, N(t))

Observation: Y(t) = N(t)

Process Noise #2Original Model:

dN/dt = bN-mN

Gillespie (SSA): Loop: Δt ~ rexp(1/(bN+mN)) ΔN ~ ±1 w.p. b/(b+m) N(t+Δt) = N(t) + ΔN

Observation: Y(t) = N(t)

Page 8: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Fitting to data?Process Noise

Stochastic model: N(t+Δt) = N(t) +

rbinom(rΔt, N(t))

Max. Likelihood Est.: θ = argminθ –logLik(θ;X)

Observation Noise

Original Model:dN/dt = f(N)

Vary parameters & simulate:

Least-squares (min. SSE):

SSE = Σ(Xi – Ni)2^

Page 9: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Statistics Application

Page 10: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Simple ExampleU.S. weight data (2007-2010) by age,

sex:

Page 11: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Does weight vary by sex?

YES!

Page 12: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Does weight vary by sex?

0 5 10 15

2040

6080

Age

MeanWeight

Page 13: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

How much? Are we sure? How sure?

Estimation ✓ Uncertainty ✓ Diagnostics ✓

Comparison/Hypothesis Test ✓

Page 14: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Remarks1. Proper statisticians have provided us

MANY tools for “well behaved” models!

2. Most dynamic models are decidedlynot “well behaved”…

3. We can still ask similar questions and compute similar answers! We just need to 1. Be wary of common pitfalls2. Use brute-force computation

Page 15: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Robust Regression

Page 16: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Outliers?

R code:# Load the robust regression packagelibrary(robustbase);…fit=lm(Y~X,data); # Outliers includedrfit=lmrob(Y~X,data); # Outliers excluded…

Robust methods identify “high leverage” data points for down-

weighting or exclusion.

Page 17: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Pelagic Fish in Lake ErieMechanistic Model: behavior/movement, physiology,

ecology.

Growth Survival

Physical Environment

(Temperature, Dissolved Oxygen)

Sub-lethal consequences: growth (fish mass; w) Direct consequences: survival (# of fish; N)

Movement

# of fishN

fish massw

Page 18: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Cool Warm

Page 19: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Cool Warm

Page 20: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Results: 1987-2005 (Aug-Oct)

Population Size

All Years (1987-2005)

Page 21: Dynamic Models Paul J. Hurtado  Mathematical Biosciences Institute (MBI), The Ohio State University 19 May 2014 (Monday p.m.)

Robust Regression

Field Observations