Description Usage Arguments Details Value Author(s) References See Also Examples
Calculates the likelihood of branching times given a vector of branching times and parameters r (net diversification rate; speciation rate S - extinction rate E) and a (the extinction fraction, E/S)
1 | calcLHbd(x, r, a)
|
x |
a numeric vector of branching times |
r |
the net diverrsification rate, S - E |
a |
the extinction fraction, E/S |
A function that can be called to explore alternative parameterizations of the birth-death process, to bootstrap likelihood confidence regions, or to generate plots of likelihood surfaces (as in Nee et al. 1994).
the likelihood of the branching times given a and r
Dan Rabosky drabosky@umich.edu
Kendall, D. G. 1948. On the generalized "birth-and-death" process. Ann. Math. Stat. 19:1-15.
Nee, S., E. C. Holmes, R. M. May, and P. H. Harvey. 1994a. Extinction rates can be estimated from molecular phylogenies. Philos. Trans. R. Soc. Lond. B 344:77-82.
Nee, S., R. M. May, and P. H. Harvey. 1994b. The reconstructed evolutionary process. Philos. Trans. R. Soc. Lond. B 344:305-311.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #plot a likelihood surface for the plethodon dataset
data("plethodon")
rvector <- seq(.001, .04, length.out = 100)
avector <- seq(0, 0.99, length.out = 100)
#calculating likelihoods:
lmatrix <- matrix(0, length(rvector), length(avector))
for (i in 1:length(rvector)){
for (j in 1:length(avector)){
lmatrix[i,j] <- calcLHbd(plethodon, rvector[i], avector[j])
}
}
#Now to plot surface:
lmax <- max(lmatrix) #maximum calculated LH
filled.contour(rvector, avector, lmatrix,
levels = seq(lmax-5, lmax, length.out = 20),
col = heat.colors(20), xlab = "Net Diversification Rate",
ylab = "Extinction Fraction", key.title = title("Log-LH"))
# plots the surface. See ?filled.contour for help on this plotting function.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.