Description Usage Arguments Details Value Note Author(s) References See Also Examples

This function fits the Yule model to any temporal window that includes at least one branching time.

1 | ```
yuleWindow(x, st1 = x[1], st2 = 0)
``` |

`x` |
a numeric vector of branching times |

`st1` |
the start of the interval you wish to examine |

`st2` |
the end of the interval you wish to examine |

'st1' and 'st2' are given in divergence units before present. If we had a set of branching times with an initial divergence 100 mya, yuleWindow(x, 75, 25) would fit the pure birth model to the portion of the tree between 75 and 25 mya. Calling yuleWindow(x, x[1], 0) will fit the model to the entire tree (identical to pureBirth(x)).

Note that st1 must be greater than st2, because they are given in units of divergence before present.

a list with the following components:

`LH ` |
the log-likelihood at the maximum |

`smax ` |
the speciation rate giving the maximum log-likelihood |

This can be used in conjunction with other models in this package to
test *a priori* hypotheses of rate variation. If, for example, it was
hypothesized that a particular climatic event occurring T mya shifted diversification rates,
you can use yuleWindow(x, x[1], T) and yuleWindow(x, T, 0) to obtain
the log-likelihoods for these two temporal windows. The log-likelihoods can then be summed
to obtain the likelihood of the full set of branching times under a 2-rate Yule model with
an *a priori* hypothesized rate-shift. This model would only have two free parameters, in contrast
to the `yule2rate`

model, with three parameters (and thus, the AIC would be computed
as (- 2 * (sum of log-likelihoods) + 4)).

Dan Rabosky [email protected]

Nee, S., R. M. May, and P. H. Harvey. 1994b. The reconstructed evolutionary
process. *Philos. Trans. R. Soc. Lond. B* 344:305-311.

Nee, S. 2001. Inferring speciation rates from phylogenies.
*Evolution* 55:661-668.

1 2 3 4 5 6 | ```
data(agamids)
agbtimes <- getBtimes(string = agamids)
yuleWindow(agbtimes, 0.22, 0.10)
# fits Yule model to temporal window between 0.22 and 0.10 divergence
# units before present
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.