CV | R Documentation |
Computes the cross-validation (CV) of a chronogram using penalized likelihood.
CV( phy, lambda = 10^(-3:2), model = "correlated", quiet = FALSE, calibration = makeChronosCalib(phy) )
phy |
an object of class |
lambda |
a numeric vector with the values of smoothing parameter to be assessed. |
model |
the model of rate evolution. currently set to autocorrelated. |
quiet |
a logical value. |
calibration |
a data frame with the calibration dates of the chronogram. |
This follows the CV calculation described in Sanderson (2002).
a matrix with two columns named lambda
and
CV
.
Emmanuel Paradis, Santiago Claramunt, Joseph Brown, Klaus Schliep
Paradis, E., Claramunt, S., Brown, J., and Schliep, K. Confidence intervals in molecular dating by penalized likelihood. (in preparation)
Sanderson, M. J. (2002) Estimating absolute rates of molecular evolution and divergence times: a penalized likelihood approach. Molecular Biology and Evolution, 19, 101–109.
qage()
drawChronosCI()
ape::chronos()
ape::makeChronosCalib()
## a simple random tree, so lambda is expected to be zero library(ape) tr <- rtree(10) res <- CV(tr, 10^seq(-4, 2, 0.25)) plot(res, type = "o", log = "xy") ## create 'artificial' auto-correlation among branches by sorting ## them according to their lengths: tr$edge.length <- sort(tr$edge.length) res <- CV(tr, 10^seq(-4, 2, 0.25)) plot(res, type = "o", log = "xy")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.