1. Islands and Integrals
Processes of Diversification in an Island Archipelago and
Bayesian Methods of Comparative Phylogeographical Model
Choice
Jamie R. Oaks1
1Department of Ecology and Evolutionary Biology, University of Kansas
October 16, 2013
Islands and Integrals J. Oaks, University of Kansas 1/53
7. Climate-driven diversification model
Repeated coalescence and
fragmentation of island
complexes
Prominent paradigm for
explaining Philippine
biodiversity
Islands and Integrals J. Oaks, University of Kansas 5/53
8. Climate-driven diversification model
Repeated coalescence and
fragmentation of island
complexes
Prominent paradigm for
explaining Philippine
biodiversity
Proposed as model of
diversification
Islands and Integrals J. Oaks, University of Kansas 5/53
9. Testing climate-driven diversification
Did repeated fragmentation of
islands during inter-glacial
rises in sea level promote
diversification?
Islands and Integrals J. Oaks, University of Kansas 6/53
10. Testing climate-driven diversification
Did repeated fragmentation of
islands during inter-glacial
rises in sea level promote
diversification?
Model has testable prediction:
Temporally clustered
divergences among taxa
co-distributed across
fragmented islands
Islands and Integrals J. Oaks, University of Kansas 6/53
14. Divergence model choice
T2
T3
T5
τ2 τ1
T1
T4
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 8/53
15. Divergence model choice
T = (T1, T2, T3, T4, T5)
τ = {τ1, τ2}
|τ| = 2
T2
T3
T5
τ2 τ1
T1
T4
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 8/53
16. Divergence model choice
T = (330, 330, 125, 125, 125)
τ = {125, 330}
|τ| = 2
T2
T3
T5
τ2 τ1
T1
T4
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 8/53
17. Divergence model choice
T = (330, 330, 125, 330, 125)
τ = {125, 330}
|τ| = 2
T2
T3
T5
τ2 τ1
T1
T4
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 8/53
18. Divergence model choice
T = (375, 330, 125, 330, 125)
τ = {125, 330, 375}
|τ| = 3
T2
T3
T5
τ2 τ1
T1
τ3
T4
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 8/53
19. Divergence model choice
T = (T1, T2, T3, T4, T5)
τ = {τ1, τ2, τ3}
|τ| = 3
T2
T3
T5
τ2 τ1
T1
τ3
T4
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 8/53
20. Divergence model choice
T = (T1, T2, . . . , TY)
τ = {τ1, . . . , τ|τ|}
|τ|
T2
T3
T5
τ2 τ1
T1
τ3
T4
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 8/53
21. Divergence model choice
T = (T1, T2, . . . , TY)
τ = {τ1, . . . , τ|τ|}
|τ|
We want to infer T given DNA
sequence alignments X
Islands and Integrals J. Oaks, University of Kansas 8/53
22. Divergence model choice
T = (T1, T2, . . . , TY)
τ = {τ1, . . . , τ|τ|}
|τ|
We want to infer T given DNA
sequence alignments X
p(T | X) =
p(X | T)p(T)
p(X)
Islands and Integrals J. Oaks, University of Kansas 8/53
23. Divergence model choice
T = (T1, T2, . . . , TY)
τ = {τ1, . . . , τ|τ|}
|τ|
We want to infer T given DNA
sequence alignments X
p(T | X) =
p(X | T)p(T)
p(X)
This approach implemented in
msBayes
Islands and Integrals J. Oaks, University of Kansas 8/53
24. Divergence model choice
T = (T1, T2, . . . , TY)
τ = {τ1, . . . , τ|τ|}
|τ|
We want to infer T given DNA
sequence alignments X
p(T | X) =
p(X | T)p(T)
p(X)
This approach implemented in
msBayes
Not that simple
Islands and Integrals J. Oaks, University of Kansas 8/53
25. The msBayes model
T2
T3
T5
τ2 τ1
T1
T4
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 9/53
29. The msBayes model
X Sequence alignments
G Gene trees
T Divergence times
Θ Demographic
parameters
T1
T2
τ2
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 10/53
30. The msBayes model
X Sequence alignments
G Gene trees
T Divergence times
Θ Demographic parameters
Islands and Integrals J. Oaks, University of Kansas 11/53
31. The msBayes model
Full Model:
p(G, T, Θ | X) =
p(X | G, T, Θ)p(G, T, Θ)
p(X)
X Sequence alignments
G Gene trees
T Divergence times
Θ Demographic parameters
Islands and Integrals J. Oaks, University of Kansas 11/53
32. The msBayes model
Full Model:
p(G, T, Θ | X) =
p(X | G, T, Θ)p(G, T, Θ)
p(X)
p(G, T, θA, θD1, θD2, τB, ζD1, ζD2, m, α, υ | X, φ, ρ, ν)
=
1
p(X)
p(T)f (α)
Y
i=1
p(θA,i )p(θD1,i , θD2,i )p(τB,i )p(ζD1,i )f (ζD2,i )p(mi )
ki
j=1
p(Xi,j | Gi,j , φi,j )p(Gi,j | Ti , θA,i , θD1,i , θD2,i , ρi,j , νi,j , υj , τB,i , ζD1,i , ζD2,i , mi )
K
j=1
f (υj | α)
Islands and Integrals J. Oaks, University of Kansas 11/53
33. The msBayes model
Full Model:
p(G, T, Θ | X) =
p(X | G, T, Θ)p(G, T, Θ)
p(X)
Approximate Bayesian computation (ABC)
X → S∗
→ B (S∗
)
Islands and Integrals J. Oaks, University of Kansas 11/53
34. The msBayes model
Full Model:
p(G, T, Θ | X) =
p(X | G, T, Θ)p(G, T, Θ)
p(X)
Approximate Bayesian computation (ABC)
X → S∗
→ B (S∗
)
Approximate Model:
p(G, T, Θ | B (S∗
)) =
p(X | G, T, Θ)p(G, T, Θ)
p(B (S∗
))
Islands and Integrals J. Oaks, University of Kansas 11/53
35. The msBayes model
Full Model:
p(G, T, Θ | X) =
p(X | G, T, Θ)p(G, T, Θ)
p(X)
T Vector of divergence times across pairs of populations
|τ| Number of divergence parameters
DT The variance of T
Islands and Integrals J. Oaks, University of Kansas 11/53
43. Empirical results
Strong support for
simultaneous divergence of
all 22 taxon pairs
pp > 0.96
∼100,000–250,000 years ago
Islands and Integrals J. Oaks, University of Kansas 14/53
45. Simulation-based power analyses
What is “simultaneous”?
Simulate datasets in which all 22 divergence times are random
Islands and Integrals J. Oaks, University of Kansas 15/53
46. Simulation-based power analyses
What is “simultaneous”?
Simulate datasets in which all 22 divergence times are random
τ ∼ U(0, 0.5 MGA)
τ ∼ U(0, 1.5 MGA)
τ ∼ U(0, 2.5 MGA)
τ ∼ U(0, 5.0 MGA)
MGA = Millions of Generations Ago
Islands and Integrals J. Oaks, University of Kansas 15/53
47. Simulation-based power analyses
What is “simultaneous”?
Simulate datasets in which all 22 divergence times are random
τ ∼ U(0, 0.5 MGA)
τ ∼ U(0, 1.5 MGA)
τ ∼ U(0, 2.5 MGA)
τ ∼ U(0, 5.0 MGA)
MGA = Millions of Generations Ago
Simulate 1000 datasets for each τ distribution
Analyze all 4000 datasets as we did the empirical data
Islands and Integrals J. Oaks, University of Kansas 15/53
50. Simulation-based power analyses: Results
Strong support for highly clustered divergences when divergence
times are random over 5 million generations
Our empirical results are likely spurious
Islands and Integrals J. Oaks, University of Kansas 17/53
51. Why the bias?
Potential causes of the bias:
1. The prior on divergence models
2. Broad uniform priors on many of the model’s parameters,
including divergence times
Islands and Integrals J. Oaks, University of Kansas 18/53
52. Causes of bias: Prior on divergence models
T = (375, 330, 125, 330, 125)
τ = {125, 330, 375}
|τ| = 3
T2
T3
T5
τ2 τ1
T1
τ3
T4
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 19/53
53. Causes of bias: Prior on divergence models
msBayes uses a discrete uniform prior on the number of
divergence events, |τ|
#ofdivergencemodels
020406080100120
1 3 5 7 9 11 13 15 17 19 21
A
p(M|τ|,i)
0.000.010.020.030.04
1 3 5 7 9 11 13 15 17 19 21
B
# of divergence events, |τ|
Islands and Integrals J. Oaks, University of Kansas 20/53
54. Causes of bias: Broad priors
msBayes uses uniform priors on most model parameters,
including divergence times
Islands and Integrals J. Oaks, University of Kansas 21/53
55. Causes of bias: Broad priors
msBayes uses uniform priors on most model parameters,
including divergence times
This requires the use of broad priors
Islands and Integrals J. Oaks, University of Kansas 21/53
56. Causes of bias: Broad priors
msBayes uses uniform priors on most model parameters,
including divergence times
This requires the use of broad priors
Models with more divergence-time parameters have much
greater parameter space, much of it with low likelihood
Islands and Integrals J. Oaks, University of Kansas 21/53
57. Causes of bias: Broad priors
msBayes uses uniform priors on most model parameters,
including divergence times
This requires the use of broad priors
Models with more divergence-time parameters have much
greater parameter space, much of it with low likelihood
This vast space can cause problems with Bayesian model
choice
Reduced marginal likelihoods
Islands and Integrals J. Oaks, University of Kansas 21/53
58. Causes of bias: Marginal likelihoods
p(X) =
θ
p(X | θ)p(θ)dθ
Islands and Integrals J. Oaks, University of Kansas 22/53
59. Causes of bias: Marginal likelihoods
p(X) =
θ
p(X | θ)p(θ)dθ
0.0 0.2 0.4 0.6 0.8 1.0
θ
0
5
10
15
20
25
30
Density
p(X| θ)
Islands and Integrals J. Oaks, University of Kansas 22/53
60. Causes of bias: Marginal likelihoods
p(X) =
θ
p(X | θ)p(θ)dθ
0.0 0.2 0.4 0.6 0.8 1.0
θ
0
5
10
15
20
25
30
Density
p(X| θ)
p(θ)
Islands and Integrals J. Oaks, University of Kansas 22/53
61. Causes of bias: Marginal likelihoods
Islands and Integrals J. Oaks, University of Kansas 23/53
62. Causes of bias: Marginal likelihoods
Islands and Integrals J. Oaks, University of Kansas 23/53
63. Causes of bias: Marginal likelihoods
Islands and Integrals J. Oaks, University of Kansas 23/53
64. Causes of bias: Marginal likelihoods
p(θ | X) =
p(X | θ)p(θ)
p(X)
p(X) =
θ
p(X | θ)p(θ)dθ
Islands and Integrals J. Oaks, University of Kansas 24/53
65. Causes of bias: Marginal likelihoods
p(θ1 | X, M1) =
p(X | θ1, M1)p(θ1 | M1)
p(X | M1)
p(X | M1) =
θ1
p(X | θ1, M1)p(θ | M1)dθ1
Islands and Integrals J. Oaks, University of Kansas 24/53
67. Causes of bias: Marginal likelihoods
Predictions:
Posterior estimates should be sensitive to priors
As prior converges to distribution underlying the data, the
bias should disappear
Islands and Integrals J. Oaks, University of Kansas 25/53
68. Causes of bias: Marginal likelihoods
Predictions:
Posterior estimates should be sensitive to priors
As prior converges to distribution underlying the data, the
bias should disappear
Testing prior sensitivity:
Islands and Integrals J. Oaks, University of Kansas 25/53
69. Causes of bias: Marginal likelihoods
Predictions:
Posterior estimates should be sensitive to priors
As prior converges to distribution underlying the data, the
bias should disappear
Testing prior sensitivity:
1. Analyze empirical data under several different prior settings
Results are very sensitive
Islands and Integrals J. Oaks, University of Kansas 25/53
70. Causes of bias: Marginal likelihoods
Predictions:
Posterior estimates should be sensitive to priors
As prior converges to distribution underlying the data, the
bias should disappear
Testing prior sensitivity:
1. Analyze empirical data under several different prior settings
Results are very sensitive
2. Use simulations to assess behavior when priors are correct
Islands and Integrals J. Oaks, University of Kansas 25/53
71. Simulation results: Performance when priors are correct
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
Posterior probability of one divergence
Trueprobabilityofonedivergence
msBayes performs well when all assumptions are met
Islands and Integrals J. Oaks, University of Kansas 26/53
72. Causes of bias: Marginal likelihoods
Predictions:
Posterior estimates should be sensitive to priors
As prior converges to distribution underlying the data, the
bias should disappear
Testing prior sensitivity:
1. Analyze empirical data under several different prior settings
Results are very sensitive
2. Use simulations to assess behavior when priors are correct
Islands and Integrals J. Oaks, University of Kansas 27/53
73. Causes of bias: Marginal likelihoods
Predictions:
Posterior estimates should be sensitive to priors
As prior converges to distribution underlying the data, the
bias should disappear
Testing prior sensitivity:
1. Analyze empirical data under several different prior settings
Results are very sensitive
2. Use simulations to assess behavior when priors are correct
3. Use simulations to assess behavior under “ideal” real-world
priors
Islands and Integrals J. Oaks, University of Kansas 27/53
75. Simulation results: Power with informed priors
0.05 0.25 0.45 0.65 0.850
5
10
15
20
τ∼U(0, 0.5 MGA)
0.05 0.25 0.45 0.65 0.850
5
10
15
20
τ∼U(0, 1.5 MGA)
0.05 0.25 0.45 0.65 0.850
2
4
6
8
10
12
τ∼U(0, 2.5 MGA)
0.05 0.25 0.45 0.65 0.850
2
4
6
8
10
τ∼U(0, 5.0 MGA)
Posterior probability of one divergence
Density
0.05 0.25 0.45 0.65 0.850
2
4
6
8
10
12
14
0.05 0.25 0.45 0.65 0.850
1
2
3
4
5
6
7
8
9
0.05 0.25 0.45 0.65 0.850
1
2
3
4
5
6
0.05 0.25 0.45 0.65 0.850.0
0.5
1.0
1.5
2.0
Posterior probability of one divergence
Density
Islands and Integrals J. Oaks, University of Kansas 29/53
76. Causes of bias: Simulation results
Broad uniform priors are reducing marginal likelihoods of models
with more divergence events
Even when uniform priors are informed by the data the bias remains
Islands and Integrals J. Oaks, University of Kansas 30/53
77. Causes of bias: Simulation results
Broad uniform priors are reducing marginal likelihoods of models
with more divergence events
Even when uniform priors are informed by the data the bias remains
Potential solution:
More flexible priors
Islands and Integrals J. Oaks, University of Kansas 30/53
78. Mitigating the bias
Potential solution:
More flexible priors
0.0 0.2 0.4 0.6 0.8 1.0
θ
0
5
10
15
20
25
30
Density
p(X| θ)
p(θ)
Islands and Integrals J. Oaks, University of Kansas 31/53
79. Mitigating the bias
Potential solution:
More flexible priors
0.0 0.2 0.4 0.6 0.8 1.0
θ
0
5
10
15
20
25
30
Density
p(X| θ)
p(θ)
Islands and Integrals J. Oaks, University of Kansas 31/53
80. Mitigating the bias
Potential solution:
More flexible priors
#ofdivergencemodels
020406080100120
1 3 5 7 9 11 13 15 17 19 21
A
p(M|τ|,i)
0.000.010.020.030.04 1 3 5 7 9 11 13 15 17 19 21
B
# of divergence events, |τ|
Islands and Integrals J. Oaks, University of Kansas 31/53
81. Mitigating the bias
Potential solution:
More flexible priors
Potential solution:
Alternative prior over divergence models (e.g., uniform or Dirichlet
process)
Islands and Integrals J. Oaks, University of Kansas 31/53
83. New method: dpp-msbayes
Reparameterized the model implemented in msBayes
Replaced uniform priors on continuous parameters with
gamma and beta distributions
Islands and Integrals J. Oaks, University of Kansas 32/53
84. New method: dpp-msbayes
Reparameterized the model implemented in msBayes
Replaced uniform priors on continuous parameters with
gamma and beta distributions
Dirichlet process prior (DPP) over all possible discrete
divergence models
Islands and Integrals J. Oaks, University of Kansas 32/53
85. New method: dpp-msbayes
Reparameterized the model implemented in msBayes
Replaced uniform priors on continuous parameters with
gamma and beta distributions
Dirichlet process prior (DPP) over all possible discrete
divergence models
Uniform prior over divergence models
Islands and Integrals J. Oaks, University of Kansas 32/53
86. dpp-msbayes: Simulation-based assessment
Simulate 50,000 datasets under four models
MmsBayes U-shaped prior on divergence models
Uniform priors on continuous parameters
MUshaped U-shaped prior on divergence models
Gamma priors on continuous parameters
MUniform Uniform prior on divergence models
Gamma priors on continuous parameters
MDPP DPP prior on divergence models
Gamma priors on continuous parameters
Analyze all datasets under each of the models
Islands and Integrals J. Oaks, University of Kansas 33/53
87. dpp-msbayes: Simulation-based assessment
Assess power
Simulate datasets in which all 22 divergence times are random
τ ∼ U(0, 0.5 MGA)
τ ∼ U(0, 1.5 MGA)
τ ∼ U(0, 2.5 MGA)
τ ∼ U(0, 5.0 MGA)
MGA = Millions of Generations Ago
Simulate 1000 datasets for each τ distribution
Analyze all 4000 datasets as we did the empirical data
Islands and Integrals J. Oaks, University of Kansas 34/53
88. dpp-msbayes: Simulation results
0.0
0.2
0.4
0.6
0.8
1.0
MmsBayes MDPP
MmsBayes
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
0.0 0.2 0.4 0.6 0.8 1.0
MDPP
Posterior probability of one divergence
Trueprobabilityofonedivergence
Analysismodel
Data model
Islands and Integrals J. Oaks, University of Kansas 35/53
89. dpp-msbayes: Simulation results
0.0
0.2
0.4
0.6
0.8
1.0
MmsBayes MDPP MUniform MUshaped
MmsBayes
0.0 0.2 0.4 0.6 0.8 1.0
0.0
0.2
0.4
0.6
0.8
1.0
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
MDPP
Posterior probability of one divergence
Trueprobabilityofonedivergence
Analysismodel
Data model
Islands and Integrals J. Oaks, University of Kansas 36/53
94. dpp-msbayes: Simulation results
Results confirm the bias of msBayes was caused by
1. Broad uniform priors
2. U-shaped prior on divergence models
The new model shows improved model-choice accuracy,
power, and robustness
Islands and Integrals J. Oaks, University of Kansas 41/53
95. Testing climate-driven diversification
Did repeated fragmentation of
islands during inter-glacial
rises in sea level promote
diversification?
Islands and Integrals J. Oaks, University of Kansas 42/53
97. dpp-msbayes: Philippine diversification
1 3 5 7 9 11 13 15 17 19 21
Number of divergence events
0.0
0.1
0.2
0.3
0.4
0.5
Posteriorprobability
msBayes
1 3 5 7 9 11 13 15 17 19 21
Number of divergence events
dpp-msbayes
Islands and Integrals J. Oaks, University of Kansas 44/53
98. dpp-msbayes: Philippine diversification
1 3 5 7 9 11 13 15 17 19 21
Number of divergence events
0.00
0.02
0.04
0.06
0.08
0.10
0.12
Probability
Prior
1 3 5 7 9 11 13 15 17 19 21
Number of divergence events
Posterior
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 45/53
99. Conclusions
Our new approximate-Bayesian method of phylogeographical
model choice shows improved behavior
Improved accuracy, robustness, and power
More “honest” estimates regarding uncertainty
Islands and Integrals J. Oaks, University of Kansas 46/53
100. Conclusions
Our new approximate-Bayesian method of phylogeographical
model choice shows improved behavior
Improved accuracy, robustness, and power
More “honest” estimates regarding uncertainty
Philippine climate-driven diversification model?
Results consistent with prediction of clustered divergences
Results suggest multiple co-divergences
However, there is a lot of uncertainty
Islands and Integrals J. Oaks, University of Kansas 46/53
101. Future directions: Full-Bayesian phylogenetic framework
T2
T3
T5
τ2 τ1
T1
τ3
T4
0100200300400500
Time (kya)
0
-50
-100 Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 47/53
102. Future directions: Full-Bayesian phylogenetic framework
0100200300400500
Time (kya)
0
-50
-100
Sealevel(m)
Islands and Integrals J. Oaks, University of Kansas 47/53
103. Software
Everything is on GitHub. . .
dpp-msbayes: https://github.com/joaks1/dpp-msbayes
PyMsBayes: https://github.com/joaks1/PyMsBayes
ABACUS: Approximate BAyesian C UtilitieS.
https://github.com/joaks1/abacus
Islands and Integrals J. Oaks, University of Kansas 48/53
104. Open Notebook Science
Everything is on GitHub. . .
msbayes-experiments:
https://github.com/joaks1/msbayes-experiments
joaks1@gmail.com
Islands and Integrals J. Oaks, University of Kansas 49/53
105. Acknowledgments
Ideas and feedback:
KU Herpetology
Holder Lab
Melissa Callahan
Mike Hickerson
Laura Kubatko
My committee
Computation:
KU ITTC
KU Computing Center
iPlant
Funding:
NSF
KU Grad Studies, EEB & BI
SSB
Sigma Xi
Photo credits:
Rafe Brown, Cam Siler, &
Jake Esselstyn
FMNH Philippine Mammal
Website:
D.S. Balete, M.R.M. Duya,
& J. Holden
Islands and Integrals J. Oaks, University of Kansas 50/53
110. Causes of bias: Insufficient sampling
Models with more parameter space are less densely sampled
Could explain bias toward small models in extreme cases
Predicts large variance in posterior estimates
We explored empirical and simulation-based analyses with 2, 5,
and 10 million prior samples, and estimates were very similar
0.0 0.2 0.4 0.6 0.8 1.0
1e8
0.0
0.2
0.4
0.6
0.8
1.0
1.2
95%HPDDT
UnadjustedA
0.0 0.2 0.4 0.6 0.8 1.0
1e8
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8 GLM-adjustedB
Number of prior samples
Islands and Integrals J. Oaks, University of Kansas 53/53