97
Brian O’Meara http:// www.brianomeara.info http://www.youtube.com/watch?v=9R8hpPY_9kY Get out laptop, fire up R

Brian O ’ Meara http:

Embed Size (px)

DESCRIPTION

Brian O ’ Meara http:// www.brianomeara.info. http://www.youtube.com/watch?v=9R8hpPY_9kY. Get out laptop, fire up R. install.packages("ctv"). library(ctv). install.views ("Phylogenetics") install.packages (" corHMM "). Model selection. Likelihood ratio test. - PowerPoint PPT Presentation

Citation preview

Page 1: Brian O ’ Meara http:

Brian O’Mearahttp://www.brianomeara.info

http://www.youtube.com/watch?v=9R8hpPY_9kYGet out laptop,

fire up R

Page 2: Brian O ’ Meara http:

install.packages("ctv")library(ctv)

install.views("Phylogenetics")install.packages("corHMM")

Page 3: Brian O ’ Meara http:

Model selection

Page 4: Brian O ’ Meara http:
Page 5: Brian O ’ Meara http:

Likelihood ratio test

test statistic = 2(ln L1 - ln L0)

Page 6: Brian O ’ Meara http:

Likelihood ratio test

Page 7: Brian O ’ Meara http:

Posada and Crandal 1998

Likelihood ratio test

Page 8: Brian O ’ Meara http:

Akaike information criterion

AICi = -2 ln Li + ki

“Truth drops out as a constant” -- Burnham and Anderson 2004

AIC is estimator as distance between truth and approximating model

Page 9: Brian O ’ Meara http:

Bayes Factors

Page 10: Brian O ’ Meara http:

Reversible jump MCMC

Model 1

Model 2 Model 2

Model 1

Page 11: Brian O ’ Meara http:

Organize by:Question Method

• Correlation of herbivory with group living

• Crepuscular foraging being intermediate between nocturnal and diurnal

• Biogeography • Causes of

diversification• Rate of trait evolution• What limits the number

of species

• Continuous time Markov Chain

• Birth death process• Multivariate normal• BiSSE and friends• Tree stretching

Page 12: Brian O ’ Meara http:

Flour, sugar, egg, butter, leavening, liquid

Page 13: Brian O ’ Meara http:

Continuous time Markov chain finite state space

A, T, G, Cwoody, herbaceous

susceptible, infected, recovered

herbivorous, omnivorous, carnivorous

0, 2, 4, 6, 8, ..., 100 legs

Page 14: Brian O ’ Meara http:

Per day:

What is probability of it leaving the store that day?If it leaves, what is the probability it was paid for?What is the probability it stays in the store ≥

two days?

Action Bought by adult

Bought by child Stolen

Probability 0.20 0.10 0.05

Page 15: Brian O ’ Meara http:

Per ∆t:

Action Bought by adult

Bought by child Stolen

Probability

0.20 /scaling

0.10 /scaling

0.05 /scaling

Page 16: Brian O ’ Meara http:

Per ∆t:

Action Bought by adult

Bought by child Stolen

Rate radult rchild rstolen

Page 17: Brian O ’ Meara http:

Per ∆t:From \

To Store Adult Child Thief

Store - rstore-adult rstore-child rstore-thief

Page 18: Brian O ’ Meara http:

Per ∆t:From \

To Store Adult Child Thief

Store - rstore-adult rstore-child rstore-thief

Adult

Child

Thief

Page 19: Brian O ’ Meara http:

Per ∆t:From \

To Store Adult Child Thief

Store - rstore-adult rstore-child rstore-thief

Adult radult-store - radult-child radult-thief

Child rchild-store rchild-adult - rchild-thief

Thief rthief-store rthief-adult rthief-child -

Page 20: Brian O ’ Meara http:

From \ To Store Adult Child Thief

Store - rstore-adult rstore-child rstore-thief

Adult radult-store - radult-child radult-thief

Child rchild-store rchild-adult - rchild-thief

Thief rthief-store rthief-adult rthief-child -

From \ To Store Adult Child Thief

Store - rstore-adult rstore-child rstore-thief

Adult radult-store - radult-child radult-thief

Child rchild-store rchild-adult - rchild-thief

Thief rthief-store rthief-adult rthief-child -

Does the store ever get Twinkies back? [Do people return Twinkies for a refund?]

H0: r*-store = 0H1: r*-store > 0

Page 21: Brian O ’ Meara http:

From \ To Store Adult Child Thief

Store - rstore-adult rstore-child rstore-thief

Adult radult-store - radult-child radult-thief

Child rchild-store rchild-adult - rchild-thief

Thief rthief-store rthief-adult rthief-child -

Do adults give to kids at the same rate kids give to adults?H0: rchild-adult = radult-child H1: rchild-adult ≠ radult-child

Page 22: Brian O ’ Meara http:

A B C DA - rAB rAC rAD

B rBA - rBC rBD

C rCA rCB - rCD

D rDA rDB rDC -

•Hypotheses about rates for a single character (are some equal? are some zero?)•Hypotheses about correlation between characters•Tree inference•Ancestral state inference

From this basic model:

Page 23: Brian O ’ Meara http:

Continuous time Markov chain finite state space

Page 24: Brian O ’ Meara http:

Currie et al. 2010 Nature

Page 25: Brian O ’ Meara http:

Currie et al. 2010 Nature

Page 26: Brian O ’ Meara http:

Currie et al. 2010 Nature

From \ To Store Adult Child Thief

Store - rstore-adult rstore-child rstore-thief

Adult radult-store - radult-child radult-thief

Child rchild-store rchild-adult - rchild-thief

Thief rthief-store rthief-adult rthief-child -

Page 27: Brian O ’ Meara http:

Currie et al. 2010 Nature

From \ To

A(acephalous)

sC(simple

chiefdom)

cC(complex chiefdom)

S(state)

A - rA-sC rA-cC rA-S

sC rsC-A - rsC-cC rsC-S

cC rcC-A rcC-sC - rcC-S

S rS-A rS-sC rS-cC -

Page 28: Brian O ’ Meara http:

Currie et al. 2010 Nature

From \ To

A(acephalous)

sC(simple

chiefdom)

cC(complex chiefdom)

S(state)

A - rA-sC rA-cC rA-S

sC rsC-A - rsC-cC rsC-S

cC rcC-A rcC-sC - rcC-S

S rS-A rS-sC rS-cC -

0

0

0

0

0 0

0 0

0

Page 29: Brian O ’ Meara http:

Currie et al. 2010 Nature

From \ To

A(acephalous)

sC(simple

chiefdom)

cC(complex chiefdom)

S(state)

A - rA-sC rA-cC rA-S

sC rsC-A - rsC-cC rsC-S

cC rcC-A rcC-sC - rcC-S

S rS-A rS-sC rS-cC -

0 0

0

0

0 0

Page 30: Brian O ’ Meara http:

Currie et al. 2010 Nature

From \ To

A(acephalous)

sC(simple

chiefdom)

cC(complex chiefdom)

S(state)

A - rA-sC rA-cC rA-S

sC rsC-A - rsC-cC rsC-S

cC rcC-A rcC-sC - rcC-S

S rS-A rS-sC rS-cC -

Page 31: Brian O ’ Meara http:

Currie et al. 2010 Nature

Page 32: Brian O ’ Meara http:

Currie et al. 2010 Nature

Page 33: Brian O ’ Meara http:

Currie et al. 2010 Nature

From \ To

A(acephalous)

sC(simple

chiefdom)

cC(complex chiefdom)

S(state)

A - med small small

sC med - large med

cC med large - med

S med med med -

Page 34: Brian O ’ Meara http:

0

1

A

01 A

B

B

No sex play

No sex play

Yes sex play

Yes sex play

No social play

No social play

Yes social play

Yes social play

Page 35: Brian O ’ Meara http:

From \ To 0A 0B 1B 1A

0A - r0A-0B r0A-1B r0A-1A

0B r0B-0A - r0B-1B r0B-1A

1B r1B-0A r1B-0B - r1B-1A

1A r1A-0A r1A-0B r1A-1B -

Page 36: Brian O ’ Meara http:

From \ To 0A 0B 1B 1A

0A - r0A-0B r0A-1B r0A-1A

0B r0B-0A - r0B-1B r0B-1A

1B r1B-0A r1B-0B - r1B-1A

1A r1A-0A r1A-0B r1A-1B -

0

0

0

0

Page 37: Brian O ’ Meara http:

0

1

A

01 A

B

B

No sex play

No sex play

Yes sex play

Yes sex play

No social play

No social play

Yes social play

Yes social play

Page 38: Brian O ’ Meara http:

0

1

A

01 A

B

B

No sex play

No sex play

Yes sex play

Yes sex play

No social play

No social play

Yes social play

Yes social play

Page 39: Brian O ’ Meara http:

Pagel 1994

From \ To 0A 0B 1B 1A

0A - r0A-0B 0 r0A-1A

0B r0B-0A - r0B-1B 0

1B 0 r1B-0B - r1B-1A

1A r1A-0A 0 r1A-1B -

Page 40: Brian O ’ Meara http:
Page 41: Brian O ’ Meara http:

Barker & Pagel 2005

Page 42: Brian O ’ Meara http:

0

1

1

01 1

0

0

Page 43: Brian O ’ Meara http:

Barker & Pagel 2005

Page 44: Brian O ’ Meara http:

Barker & Pagel 2005

Page 45: Brian O ’ Meara http:
Page 46: Brian O ’ Meara http:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 a

2 a b

3 b c

4 c d

5 d e

6 e f

7 f g

8 g h

9 h i

10 i j

11 j k

12 k l

13 l m

14 m n

15 n o

16 o

... up to maximum number of genes

...

......

where a, b, etc. are just f(i, j, birthdeath rate)

Page 47: Brian O ’ Meara http:

Ree & Smith 2008

Page 48: Brian O ’ Meara http:

Ree & Smith 2008

Page 49: Brian O ’ Meara http:

Courtesy Nicolas Salamin

Page 50: Brian O ’ Meara http:

Joint: Choose values for x, y, z, w that together maximize likelihood

Page 51: Brian O ’ Meara http:

Joint: Choose values for x, y, z, w that together maximize likelihood

Marginal: Choose value for x (and repeat for others) that maximizes

likelihood while integrating over all values for y, z, w

Page 52: Brian O ’ Meara http:

Joint: Choose values for x, y, z, w that together

maximize likelihood

Marginal: Choose value for x (and

repeat for others) that maximizes likelihood while

integrating over all values for y, z, w

Henry Hargreaves

Page 53: Brian O ’ Meara http:

Finnigan, G. C., V. Hanson-Smith, T. H. Stevens, and J. W. Thornton. 2012. Evolution of increased complexity in a molecular machine. Nature 481:360-U143.

Page 54: Brian O ’ Meara http:

Courtesy Nicolas Salamin

Page 55: Brian O ’ Meara http:

Equal: all states equally likely

Empirical: count the proportion of each state in the tip taxa

Fixed: make them up (ideally, based on knowledge)

Equilibrium: what they'd be if the process ran forever

This assumption can have a major effect on results

Page 56: Brian O ’ Meara http:

Schluter et al. 1997

Page 57: Brian O ’ Meara http:

Beaulieu, O'Meara, and Donoghue, 2013

Page 58: Brian O ’ Meara http:

Beaulieu, O'Meara, and Donoghue, 2013

Page 59: Brian O ’ Meara http:

Beaulieu, O'Meara, and Donoghue, 2013

Page 60: Brian O ’ Meara http:

Beaulieu, O'Meara, and Donoghue, 2013

Page 61: Brian O ’ Meara http:

Tree stretching

Page 62: Brian O ’ Meara http:
Page 63: Brian O ’ Meara http:

Continuous

- rAB × t

rAC × t

rAD × t

rBA × t - rBC ×

trBD ×

t

rCA × t

rCB × t - rCD ×

t

rDA × t

rDB × t

rDC × t -

e( )

Discrete

Page 64: Brian O ’ Meara http:

Lambda = multiply internal branch lengths1

0.5

0

Page 65: Brian O ’ Meara http:

Delta = speed up or slow down

1

1.5

0.5

Page 66: Brian O ’ Meara http:

Kappa = raise each branch to kappa.

Punctuational models.

0.5

0

1

Page 67: Brian O ’ Meara http:

Eldredge and Gould 1971

Page 68: Brian O ’ Meara http:

Eldredge and Gould 1971

¿=?≠

Page 69: Brian O ’ Meara http:

Schematic illustration of evolution of one phenotype on a phylogeny leading to three extant species. Cladogenetic change appears as vertical lines as it is modeled here as an instantaneous event on a geological time scale. Anagenetic change appears as Brownian motion of the phenotype on a logarithmic scale. Sh indi- cates the speciation events that do not appear on a reconstructed phylogeny but did contribute to phenotypic evolution of the extant species, and S◦ indicates a speciation event that can be “ob- served” in a reconstructed phylogeny. In the resulting “branching Brownian motion,” species E and F are separated by three speciation events of which two contributed to the phenotypic difference between E and F. F and G are separated by four events that all four contributed to the present phenotypic difference between F and G.

Bokma 2008

Page 70: Brian O ’ Meara http:

Bokma 2008Eldredge and Gould 1971

=

Page 71: Brian O ’ Meara http:

Two rate: apply different rate before and after some point

(in this case, midpoint)

1

2after

0.2after

Page 72: Brian O ’ Meara http:

What questions can we answer with tree stretching?

Page 73: Brian O ’ Meara http:

Heterogeneity

Page 74: Brian O ’ Meara http:

Smith and Donoghue. Rates of Molecular Evolution Are Linked to Life History in Flowering Plants. Science (2008)

Trees/shrubs

Herbs

Subs

titut

ions

/MY

Page 75: Brian O ’ Meara http:

Meredith et al. 2011, Science

Page 76: Brian O ’ Meara http:

O’Meara 2012

Page 77: Brian O ’ Meara http:

O’Meara 2012

Page 78: Brian O ’ Meara http:

O’Meara 2012

Page 79: Brian O ’ Meara http:

O’Meara 2012

Page 80: Brian O ’ Meara http:

Yang 1994

Page 81: Brian O ’ Meara http:

O’Meara 2012

Page 82: Brian O ’ Meara http:

Pagel and Meade 2004

Familiar

Mixture model

Note: likely used a window, not

mentioned, though

Page 83: Brian O ’ Meara http:

O’Meara 2012

Page 84: Brian O ’ Meara http:

O’Meara 2012

Page 85: Brian O ’ Meara http:

Tree stretching

Heterogeneity

Tree stretching + Heterogenei

ty

Continuous methods Y some some

Discrete methods Y nope nope

Page 86: Brian O ’ Meara http:

O’Meara 2012

Page 87: Brian O ’ Meara http:

library(geiger)?fitContinuous?fitDiscrete

#Look at some Geospiza examples. Is the rate of beak depth evolution dropping in Darwin’s finches?

http://www.youtube.com/watch?v=BZG14R5p6Kg http://www.youtube.com/watch?v=h6fqrDShlMM

Page 88: Brian O ’ Meara http:

MADDISON. Confounding asymmetries in evolutionary diversification and character change. Evolution (2006) vol. 60 (8) pp. 1743-1746

Page 89: Brian O ’ Meara http:

MADDISON. Confounding asymmetries in evolutionary diversification and character change. Evolution (2006) vol. 60 (8) pp. 1743-1746

Page 90: Brian O ’ Meara http:

MADDISON. Confounding asymmetries in evolutionary diversification and character change. Evolution (2006) vol. 60 (8) pp. 1743-1746

Page 91: Brian O ’ Meara http:

MADDISON. Confounding asymmetries in evolutionary diversification and character change. Evolution (2006) vol. 60 (8) pp. 1743-1746

Page 92: Brian O ’ Meara http:

0 1q01

q10

speciation0 speciation1

extinction0extinction1

Page 93: Brian O ’ Meara http:

MADDISON. Confounding asymmetries in evolutionary diversification and character change. Evolution (2006) vol. 60 (8) pp. 1743-1746

Page 94: Brian O ’ Meara http:

MADDISON. Confounding asymmetries in evolutionary diversification and character change. Evolution (2006) vol. 60 (8) pp. 1743-1746

Page 95: Brian O ’ Meara http:

MADDISON. Confounding asymmetries in evolutionary diversification and character change. Evolution (2006) vol. 60 (8) pp. 1743-1746

Page 96: Brian O ’ Meara http:

MADDISON. Confounding asymmetries in evolutionary diversification and character change. Evolution (2006) vol. 60 (8) pp. 1743-1746

Page 97: Brian O ’ Meara http:

Goldberg et al. 2010