The modelling cycle

advertisement
Theoretical Modelling in Biology (G0G41A )
Pt I. Analytical Models
I. Introduction
Tom Wenseleers
Dept. of Biology, K.U.Leuven
7 October 2008
Course instructors
Tom Wenseleers
Lab. of Entomology
Joost Vanoverbeke
Lab. of Aquatic Ecology
and Evolutionary Biology
Pt. I. Analytical models (4x2h)
tom.wenseleers@bio.kuleuven.be
Pt. II. Simulation-based models (3x2h)
joost.vanoverbeke@bio.kuleuven.be
Goals
• Learn to appreciate the utility of biological
modelling in evolution & ecology
• Get conceptual insight into interesting
biological questions
• Learn to use two modelling platforms:
Mathematica for analytical models and
Simile for simulation-based models
• Demonstrate that with the help of these
programs you do not need to be a
mathematician to make models!!
Goals
• Ensure that if you come across models in the
literature you can easily check the results or
further extend them.
• 35% of all Evolution and Ecology articles use
mathematical models, 60% of all of those in
American Naturalist
• Modelling is also a very valued skill in industry
Outline
•
•
•
•
•
•
What is theoretical modelling?
Why model?
The modelling cycle
Modelling approaches
Course schedule & some practical things
Introduction to Mathematica
What is theoretical modelling?
• “The activity of translating a real problem
into mathematics for subsequent analysis”
Edwards and Hamson, 1996
Why model?
Why model?
Darwin: "Mathematics seems to endow one
with something like a new sense"
Why model?
• One of the benefits of formal mathematical
models is that they can show whether proposed
mechanisms or verbal ideas can actually work.
• Theoretical models may also
1) make useful quantitative predictions
2) generate new insights,
e.g. explain counterintuitive phenomena
3) suggest further experiments that might help
to discriminate between alternative theories
E.g. handicap principle
• Amotz Zahavi (1975): peacock's tail is
a signal of the male that it is of good
quality, since only good quality males
can afford such an expensive display
• Idea was widely ridiculed and criticised.
Traditional idea was that the tail just
helps attract mates by making them
more visible.
• In 1990 Alan Grafen then showed
theoretically under what circumstances
the idea can work. Later empirical work
showed peacock's tail is indeed a
Zahavian handicap.
The
modelling
process
The modelling process
• Can be formulated as a “modelling cycle”
• The starting point is biology not mathematics
• Usually the hardest part in modelling is
identifying an interesting question, not
solving the equations!!
The modelling cycle
Step 1:
Identify the
problem
The modelling cycle
1. Identify the
problem
• The problem needs to be biologically
interesting and non-trivial
• But it also needs to be tractable: as the
Nobel laureate Peter Medawar put it,
science is the ‘art of the soluble’, and part
of that art is choosing a problem which will
turn out to be soluble.
The modelling cycle
1. Identify the
problem
One common use for models is to try to explain
puzzling phenomena
E.g. why are as much as 30% of all broods
deserted by both parents in penduline tits?
Every parent benefits from letting the other
parent take care of the young, cost is that
parents sometimes both leave.
At equilibrium benefit=cost.
With model we could explain why 30% of
the nests are abandoned and why exactly
this species has this system.
The modelling cycle
Step 2:
List the factors
and assumptions
Listing the
assumptions and
key factors
is not trivial
or easy!
Abstract your problem!
• Experiments look at the world in a simple
way
Us rats don't
usually live
these conditions...
• Models also look at the world given certain
assumptions and taking into account the
effects of a limited set of parameters
Don’t create a Rube Goldberg model!
Always start from the simplest model possible.
Modelling cycle
The modelling cycle
1. Identify the
real problem
2. List the factors
and assumptions
Abstraction: involves making simplifying assumptions
which will make a problem tractable, at the risk of
course, of oversimplifying and thus making the solution
of less value. Can also involve discarding parameters
which on an a-priori basis you don't expect to matter.
Model formulation: define the variables (entities that
change) and parameters (quantities that are fixed) in the
model, define how they are bounded and how they
interact, choose a time scale and whether to treat time
as discrete or continuous
Ockham’s razor
14th-century English logician
William of Ockham
“If two explanations can both explain
the observations, we should prefer
the explanation that postulates fewer
entities or processes or that makes
the smallest number of independent
assumptions.”
The simplest solution is the best!
The modelling cycle
Step 3:
Formulate and solve
the mathematical
problem
The modelling cycle
1. Identify the
real problem
2. List the factors
and assumptions
3. Formulate and solve the
mathematical problem
This is often
the easiest
part!
3. Formulate and solve the
mathematical problem
• Formulation: several ways of proceeding,
i.e. different model types and methods,
each of which has its pros and cons
(detailed later)
• Two main approaches: analytical models
or numerical simulations
• Solving the model: generally one of the
easiest parts of the process. Number of
computer packages to do this.
The modelling cycle
Step 4:
Interpret the
mathematical
solution
The modelling cycle
1. Identify the
real problem
2. List the factors
and assumptions
3. Formulate and solve the
mathematical problem
4. Interpret the
mathematical
solution
4. Interpret the
mathematical solution
• Solution may be an equation or you may need to plot
a number of graphs
• How do your parameters affect your variables?
• Sensitivity analysis: how robust are your results?
• What do the results imply or suggest?
• What does it tell us that is new and that we did not
understand before?
• What predictions can we make?
The modelling cycle
Step 5:
Compare with the
real world
The modelling cycle
1. Identify the
real problem
2. List the factors
and assumptions
5. Compare with
the real world
3. Formulate and solve the
mathematical problem
4. Interpret the
mathematical
solution
The modelling cycle
• Do the model’s results match existing
data? = model validation
• Frequently, a formal model may also
suggest important parameters that would
be desirable to be measured empirically
• Full model validation may only be possible
after such additional empirical research
If all is well...
The modelling cycle
Step 6:
Publish!
Otherwise...
The modelling cycle
1. Identify the
real problem
2. List the factors
and assumptions
Go back to beginning:
• What factors have I missed?
• What processes have I oversimplified?
• In short, what is wrong?
Recap
1. Identify the
real problem
2. List the factors
and assumptions
5. Compare with
the real world
3. Formulate and solve the
mathematical problem
6. Publish and
make testable
predictions
4. Interpret the
mathematical
solution
Modelling
approaches
Two main approaches
to modelling
• Analytical
- using only maths
- usually deterministic
• Numerical simulation
- problem numerically solved or
simulated on a computer
- stochasticity automatically
covered
Analytical models
• often give nice and elegant results
• results simpler to interpret than those
stemming from simulation models
• requires a greater level of abstraction than
most simulation models
• downside is that more simplifying
assumptions are made, e.g. infinite
population size, usually no stochasticity and
not spatially explicit
Example of analytical model
• When should you fight for a resource?
• If both individuals (players) fight, each get half
the resource (V/2) but they also pay a fighting
cost (C)
• If both don’t fight, they share the resource with
no cost (each gets V/2)
Hawk-dove game
Maynard Smith & Price 1973
Game theoretic solution
• Frequency of hawks = p
• Frequency of doves = (1-p)
• Fitness of hawk genotype = baseline fitness +
(1-p)*payoff of interacting with dove [i.e. V] +
p*payoff of interacting with hawk [i.e. (V-C)/2]
• Fitness of dove genotype = baseline fitness +
(1-p)*payoff of interacting with dove [i.e. V/2]
+ p*payoff of interacting with hawk [i.e. 0]
Game theoretic solution
• evolutionary stable state (ESS): equilibrium mix
• at ESS in hawk-dove game
fitness hawk = fitness dove
(1-p)*V + p*(V-C)/2 = (1-p)*V/2
which occurs when
p = V/C
= equilibrium frequency of hawk
Maynard Smith
Other example: optimality models
e.g. D. Lack's clutch size model
Probability of
survival
Clutch size c
Number of
surviving young s
Young
Why do some birds have large clutches and others small ones?
Hypothesis: in each species parents should maximise the
number of surviving young. This is determined by how many
offspring the parent can feed.
s / c  0
optimal clutch size
Clutch size c
Recurrence, difference and
differential equations
• most analytical models employ either recurrence
equations or differential equations
• recurrence equations: variable (n) in next time unit is
written as a function of the variable in the current time unit
n(t+1) = "some function of n(t)"
or we can calculate the difference equation
Dn = n(t+1) - n(t) = "some function of n(t)"
(discrete time steps)
• differential equation: rate of change of variable over time
d(n(t))/dt = "some function of n(t)"
(continuous time)
Recurrence, difference and
differential equations
• can be used to model the increase or decrease of a
genotype or the increase or decrease of the
abundance of a species over time
• readily solved using computer algebra systems such
as Mathematica or Maple
• so don't be scared of the maths: the computer can
do most of the hard work for you!!
Computer algebra systems
http://www.wolfram.com/
http://www.maplesoft.com/
Many other less powerful systems:
http://en.wikipedia.org/wiki/Comparison_of_computer_algebra_systems
Simulation-based models
• more complex models can often only be
solved numerically
• we can then either solve our equations
numerically using packages such as
Mathematica, Matlab or graphical
environments such as Stella or Simile
• or we can simulate what happens to the
population by explicitly modelling every single
individual (individual-based models), this
automatically takes into account stochasticity
Typical usage of
simulation-based models
• Complex, highly realistic models
• Spatially explicit models
• Finite population models
(stochastic models)
• Models with many interacting species
• Self-organised behaviour: how simple
individual behaviour can lead to complex
overall patterns
Example: spatially explicit model
• cooperators: invest in cooperation
• defectors: do not invest in cooperation but get
benefit
• interactions are local on a lattice
(cellular automaton)
• birth is stochastic
• space can sometimes help
to stabilize cooperation
(Nowak & May 1992)
Self-organised behaviour
System composed of many “sub-units” or “agents”
workers in an ant colony
cells in a multicellular organism
birds in a flock
Individual agents react to local conditions
Global pattern arises from agent behaviour
No one is in overall charge, no "leader" or "master plan"
No one “knows” the overall state of the system
Camazine, S., Deneubourg, J.L., Franks, N. R., Sneyd, J.,
Theraulaz, G., Bonabeau, E.
2001. Self-organization in
biological systems. Princeton
University Press.
Simulation platforms
• Traditional low-level implementation:
e.g. Basic, Fortran, C++
• Graphical modelling interface ("Systems
dynamics"): Stella, Modelmaker, Powersim,
Vensim, Matlab/Simulink, Simile
• Individual-based models: Swarm, Echo,
XRaptor, Matlab/Simulink, Gecko, StarLogo,
Simile
Graphical modelling environments
Simile, Stella, Modelmaker etc...
Graphical interface to
construct more complex
difference or differential
equations models:
systems dynamics approach
Simile also allows individualbased models to be
constructed.
When to use different models?
• Different models give different insight:
• Analytical models
- Quick and easy to understand
- Sometimes overly simplistic
- But good to test whether some
idea can work conceptually
When to use different models?
• Different models give different insight:
• Simulations
- More complicated to interpret and harder to
plot results for all possible ranges of
parameters
- More appropriate when a model needs to be
highly realistic, e.g. in fisheries where models
are used for policy making
- Can also be used to test analytical models
What have we learned?
Modelling isn't so hard
Different models can
give different insight
Course schedule
Place: Dekenstraat 2, VHI - 02.09 (LUDIT PC-KLAS H2), every Tuesday 10h30-12h30
7/10
Introduction, how to build a model, modelling approaches, introduction to the
Mathematica platform for solving analytical models
14/10
Difference and differential equation models, with examples from population
ecology (population growth, competititve interactions between two species,
functional responses)
21/10
Game theory and inclusive fitness: evolutionarily stable strategies, applications
in the areas of social evolution and the evolution of mating strategies
28/10
Explicit genetic models, applications from evolutionary genetics and behavioural
ecology
04/11
Introduction to numerical simulation models using the Simile platform,
examples from population ecology (population dynamic models with interactions
between more than two species and with different age classes)
11/11
Public holiday, no course
18/11
Individual-based and spatially explicit models
25/11
Modelling of food webs
Practicals: Do your own
modelling project!
• Check the results of a model from the literature using
Mathematica or Simile and make a minor extension (e.g.
add one more parameter), or develop a simple new model
• A list of possible topics will be provided by us but you can
also suggest a topic of your own
• Best way to get hands-on experience in modelling
• One project per group of 2 students
• Groups and topics should be decided before the end of
October, please already indicate your interests on sheet
provided
Practicals: Do your own
modelling project!
• Projects will be supervised on a semi-individual basis by
me (analytical models) and Joost (simulation models)
• Three stages:
(1) determine best modelling approach
(2) develop model
(3) validate model, perform sensitivity analysis
• Assessment: based on final Powerpoint presentation
plus a short 5 page paper with the key results
• Counts as the exam (no formal exam will be organised)
Course material
• TOLEDO: http://toledo.kuleuven.be/
- Powerpoint slides
- Mathematica notebooks and Simile files with
exercises and problem solutions
- useful papers
• Installation CD with Mathematica 6,
Simile 5.3 and Populus
- check file "installation instructions.doc"
Recommended books Pt. I
M. Bulmer (1994) Theoretical Evolutionary Ecology.
H. Kokko (2008) Modelling for Field Biologists.
Recommended books Pt. I
J.H. Vandermeer & D.E. Goldberg (2003)
Population Ecology: First Principles.
D. Alstad (2000) Basic Populus Models of Ecology.
(see also Populus help file on CD)
Recommended books Pt. I
S.P. Otto & T. Day (2007) A Biologist's Guide to
Mathematical Modeling in Ecology and Evolution.
Feedback
This course is organised for the first time.
Everything can be changed flexibly, and we
appreciate your feedback!
Download