Basic concepts of formulating models

advertisement
Basic concepts of formulating models
– Models are at the heart of science.
• Verbal, graphical, mathematical.
– Dynamical models:
• Describe how a system changes over time.
• Due to processes ((‘forces’)
forces ) that act to change a
biological entity:
–
–
–
–
–
–
Cell or cellular compartment
O
Organism
i
Population of organisms
Species
Assemblage or community of species
Ecosystems
Basic concepts of formulating models
• Two broad classes of dynamical models:
– Deterministic: outcome entirely predicted.
– Stochastic: random events affect the system:
• Within specified limits.
• Described
D
ib d b
by probability
b bilit di
distributions.
t ib ti
Most common: normal distribution
(G
(Gaussian)
i )
Many other distributions also used
used.
Basic concepts of formulating models
• Basic steps:
(1)
(2)
(3)
(4)
(5)
(6)
(7)
Formulate the question.
Determine the basic ingredients.
Qualitatively describe the system.
Quantitatively
Q
i i l describe
d
ib the
h system.
Analyze the questions.
Checks and balances.
balances
Relate the results back to the original question.
(1) Formulate the question
• Ask a question:
– Dynamical systems: questions concern how some
system changes over time
time.
– Pattern: How do objects or substances increase or
decrease over time?
→ Process: Why do objects or substances increase or
decrease over time.
• In modeling,
modeling postulate the ‘why’
why to predict the ‘how’
how .
• Delimit the system:
– What should be included or excluded
excluded.
• Anticipate that our system will generalize to other
systems.
y
– Special cases.
(2) Determine the basic ingredients
• Identify and define the variables of interest.
– Dynamical systems: time is almost always a variable.
• Might be ‘factored out’ in the process of formulating the
model (e.g., allometry).
– Other variables are entities that might change over
time.
– Abstract and simplify: decide what to include and
what to ignore.
• Initially, fewer is better, fewest is best.
• Balance simplicity vs.
vs reality.
reality
Make things as simple as possible, but no simpler.
– Albert Einstein
Determine the basic ingredients
• Assign algebraic symbols to variables: N, p, x.
– Use subscripts to ‘subset’ variables:
• pI = proportion of immigrants, pE = proportion of emigrants.
• n1 and n2 = sizes of populations of species 1 and 2.
– Use subscript or function notation to identify timedependent variables: Nt or N(t).
• Use Nt or N·t or (N)(t) to imply multiplication.
– In stochastic models, often distinguish between a random
variable (X) and a particular instantiation (instance) of the
random variable (x).
Determine the basic ingredients
• Predictor / response terminology:
– Predictor variable (=independent variable): a variable, such
as time,
ti
th t is
that
i assumed
d tto drive
d i the
th system.
t
– Response variable (=dependent variable): a variable that
responds to changes in the independent
• Identify constraints on variables, e.g.:
–
–
–
–
–
Real vs. integer
g
Positive or non-negative
Proportions or probabilities: 0  p  t   1 or 0  p  t   1
Frequencies:  ni  N
Some versions of models might require other constraints.
• Also
Al id
identify
tif ranges that
th t are biologically
bi l i ll reasonable.
bl
Determine the basic ingredients
• Ch
Choose ttype off dynamical
d
i l model
d l tto d
describe
ib
changes in variables:
Magnitude
– Discrete-time vs.
vs continuous-time:
Discrete predictions
Time
Determine the basic ingredients
• Both discrete-time and continuous-time models are
simplifications.
– Depend on time units: seconds, days, years, …
– Involve
I
l different
diff
t assumptions
ti
and
d mathematical
th
ti l
representations.
– Display different dynamic patterns, often different results.
• (1) Discrete-time models:
– Assume no change in response variables within time units.
• Time ‘ticks’ in integers.
g
• Response units (e.g., population size) ‘appear’ discretely.
• For shorter time units, responses often measured as integers,
rounded from a threshold fraction.
– Often modeled using recursion equations or difference
equations.
– Results may depend on length of time unit.
– Can’t be interpolated within time units.
Determine the basic ingredients
• (2) Continuous-time models:
– Assume that response variables can change at any
point along a continuous time scale.
• In practice, time is always discrete.
• In principle,
principle time units can be arbitrarily small .
– Leads to biological assumptions about when response
variables ‘occur’.
• Again, responses often measured as integers, rounded
from a threshold fraction.
• E.g.,
E g population size: when does an individual ‘appear’?
appear ?
– Conception, birth, juvenile independence, adult onset?
– Often modeled using differential equations.
Determine the basic ingredients
• Response variables can be modeled as either
continuous or discrete.
– E.g.,
E
population
l ti size:
i
number,
b bi
biomass.
• Justifications for modeling as continuous:
– Response take on sufficiently large values that
treating them continuously introduces little error.
– Manyy discrete variables can be converted to or
reinterpreted as continuous variables.
– Mathematical convenience: fewer constraints.
• All
Allows use off calculus
l l concepts
t and
d ttools.
l
• Simplifies stochastic models: random variation usually
modeled on a continuous scale.
– Exceptions: binomial or Poisson processes.
Determine the basic ingredients
• (1) Discrete-time models:
– Equations applied recursively (iteratively) to track a
response variable
i bl over titime.
• Recursion equations, predict response values:
N  t  1  f  N  t  
N  t   f  N  t  1 
}
Either form can be used,
depending on mathematical
convenience.
• Difference equations, predict differences:
N  N  t  1  N  t   f  N  t  
• Can often be re-expressed
re expressed in terms of one another
another.
Determine the basic ingredients
• (2) Continuous-time models: differential equations
often used to describe or predict the rate of change
off the
th response variables
i bl over titime:
dy
 f  x
– Based on the concept of a derivative:
dx
• ‘Instantaneous’ slope of a function y = f(x) at a
particular value of x.
Determine the basic ingredients
– Differential equation specifies the ‘instantaneous’
change in y as a function of y itself:
dN  t 
dy
 f  y  , e.g.
 f  N t 
dx
dt
– Describes the ‘ebb and flow’ of a variable.
– ‘Instantaneous
Instantaneous slope’
slope may be large or small, or
positive, zero, or negative.
Determine the basic ingredients
• When use differential equations as a tool in a model:
– Typically begin by hypothesizing how various
biological
g
factors will change
g the state of the variable.
• Contribute to the function f  N  t   in:
dN  t 
 f  N t 
dt
– Th
Then ‘solve’
‘ l ’ th
the equation
ti tto iinfer
f th
the actual
t l value
l off
the response variable:
t  N i 

t  N0 
dN  t 
dN  t  t  N i 
dt  N  t 
  f  N t   N t   
dt
dt
t  N0 
– Use tools of analytic or numerical integration.
Determine the basic ingredients
• Several types of differential equations:
– Functions of >1 predictor variable.
• E
E.g.,
g populations size might change as a function of
current population size and the size of a predator
population.
– Functions of a predictor variable and time
time, if the
function changes over time.
• Time is the p
predictor ((independent)
p
) variable.
• Population size might change as a function of current
population size and seasonal environmental limitations.
– ‘Lag’
Lag functions of the past state of a response variable.
variable
• Population size might change as a function of the
population size at a previous time.
– Many possible combinations.
Determine the basic ingredients
• Main classification of differential equations:
– Ordinaryy differential equations
q
((ODEs):
) one p
predictor
(independent) variable.
• E.g., time.
– Partial differential equations (PDEs): >1 predictor
variables.
• E.g.,
E g time and space.
space
• Examine response variable as a function of one
predictor variable, “holding the others constant”.
• ‘Partial’ out the effects of the other predictor
variables.
Determine the basic ingredients
• Variables
V i bl and
d parameters:
t
– Variables ‘vary’, possibly within specified bounds.
• Predictor (independent) variables
variables.
• Response (dependent) variables.
– Any two variables can vary:
• Independently.
– Can model one variable without worrying about others.
• Interactively:
– Must identify interactions: manner in which variables affect
one another.
– Simplest
Si l t assumption
ti about
b t iinteraction:
t
ti
mass-action.
ti
» Rate of interaction between two variables is proportional
to the values of each.
» E.g., under random motion, can multiply densities of two
kinds of objects to determine number of interactions.
Determine the basic ingredients
• Variables and parameters:
– Parameters specify the form of the model.
• Generally assumed to be either constant or stochastic for a
particular application of the model.
• Values either fixed by investigator or estimated from data.
data
– E.g., simple linear model: y  mx  b
•
•
•
•
x = predictor (independent) variable.
y = response (dependent) variable.
m = slope parameter.
b = ‘yy-intercept
intercept’ parameter.
parameter
Determine the basic ingredients
• T
Two
o basic ways
a s in which
hich we
e can speak of fifixed
ed
parts of models.
• Based on descriptions of two different ‘worlds’:
worlds :
(1) External world described by models.
• Discriminate between deterministic and stochastic
elements.
(2) Conceptual world of the investigator.
• Discriminate between:
– Fixed aspects of the model (=structure).
» E.g., linear vs nonlinear, exponential vs logistic.
– Parts about which there is uncertainty: parameters.
• Parameters at one stage of modeling can become fixed
aspects at another stage, and vice versa.
– E.g., linear intercept parameter set to zero.
Basic concepts of formulating models
• Basic steps:
(1)
(2)
(3)
(4)
(5)
(6)
(7)
Formulate the question.
Determine the basic ingredients.
Qualitatively describe the system.
Quantitatively
Q
i i l describe
d
ib the
h system.
Analyze the questions.
Checks and balances.
balances
Relate the results back to the original question.
(3) Qualitatively describe the system
• T
Tools
l th
thatt formulate
f
l t the
th model
d l with
ith th
the aid
id off
diagrams, tables, etc.
– Life-cycle diagrams:
• Useful for discrete-time
models.
• >1 event can occur within
a single time step.
– Flow diagrams:
• Useful for multiple variables, continuous or discrete.
• Sequence is important for discrete-time models.
Qualitatively describe the system
• Tables of variables and parameters used to
augment graphical depictions:
– E.g., for mass-action interactions:
– Particularly useful for discrete
discrete-time
time models
models.
(4) Quantitatively describe the system
• Derive dynamical equations for the model:
– Specify the factors that cause a response variable to
increase or decrease over time.
– Generally have one of the three standard forms:
• Recursion equation:
N  t  1  N  t   increase  decrease
• Difference equation: N  increase  decrease
• Differential
Diff
ti l equation:
ti
d  N t 
dt
 rate off increase
 rate of decrease
Quantitatively describe the system
• E.g., simple exponential growth:
– Recursion form:
N  t  1  N  t   rN  t   RN  t 
– Difference
Diff
fform: N  RN  t 
– Differential form:
d  N t 
dt
 rN  t 
Quantitatively describe the system
• E.g., logistic growth:
 N t  
N  t  1 
– Recursion
R
i fform: N  t  1  N  t   rN

K


 N t  
– Difference form: N  rN  t  1 

K 

dN
 N
 rN 1  
– Differential form:
dt
 K
– Note that estimates of r might differ for discrete-time
vs. continuous-time models.
– In general
general, parameter estimates will differ for discrete
discretetime vs. continuous-time models.
(5) Analyze the model
• Many possible tools:
–
–
–
–
–
–
Graphical
p
analysis.
y
Simulations.
Equilibrium and stability analysis.
Analyzing model for periodic behavior.
Extrapolating to general solutions.
D t
Determining
i i asymptotic
t ti (l
(long-term)
t
) behavior.
b h i
(6) Checks and balances
• Modeling is an iterative procedure:
– Check carefully for mathematical errors.
– Check the dimensionality (units) of variables and
parameters (=dimensional analysis).
– Make sure that results satisfy constraints on variables
and parameters.
– Make sure that results g
give expected
p
results for
special cases (test cases) for which results are
known.
• Simple cases that can be derived ‘by
by hand’
hand .
• Data from the scientific literature.
– Check g
general results against
g
general expectations.
g
p
(7) Relate results back to the
biological questions
• Successful scientific models:
– Should be consistent with other models, both in
structure and results.
– Should change the way we think about the problem.
problem
– Should make explicit predictions that can be tested by
observation or experiment.
Download