NPRS.criterion {ape} | R Documentation |
NPRS.criterion
computes the objective function to be minimized
in the NPRS (nonparametric rate smoothing) algorithm described in
Sanderson (1997).
NPRS.criterion(phy, chrono, expo = 2, minEdgeLength = 1e-06)
phy |
A non-clock-like phylogenetic tree (i.e. an object of class
"phylo" ), where the branch lengths are measured in
substitutions. |
chrono |
A chronogram, i.e. a clock-like tree (i.e. an object of
class "phylo" ), where the branch lengths are measured in
absolute time. |
expo |
Exponent in the objective function (default value: 2) |
minEdgeLength |
Minimum edge length in the phylogram (default value: 1e-06). If any branch lengths are smaller then they will be set to this value. |
Please refer to Sanderson (1997) for mathematical details. Note that
is is not computationally efficient to optimize the branch lengths in
a chronogram by using NPRS.criterion
- please use
chronogram
instead.
NPRS.criterion
returns the value of the objective function given
a phylogram and a chronogram.
Gangolf Jobb (http://www.treefinder.de) and Korbinian Strimmer (http://www.stat.uni-muenchen.de/~strimmer/)
Sanderson, M. J. (1997) A nonparametric approach to estimating divergence times in the absence of rate constancy. Molecular Biology and Evolution, 14, 1218–1231.
library(ape) # get tree data("landplants.newick") # example tree in NH format tree.landplants <- read.tree(text = landplants.newick) # plot tree tree.landplants plot(tree.landplants, label.offset = 0.001) # estimate chronogram chrono.plants <- chronogram(tree.landplants) # plot and write to file plot(chrono.plants, label.offset = 0.001) write.tree(chrono.plants, file = "chronogram.phy") # value of NPRS function for our estimated chronogram NPRS.criterion(tree.landplants, chrono.plants)