optim.phylo.ls: Phylogeny inference using the least squares method

View source: R/optim.phylo.ls.R

optim.phylo.lsR Documentation

Phylogeny inference using the least squares method

Description

Phylogenetic inference using the method of least-squares (Cavalli-Sforza & Edwards, 1967).

Usage

optim.phylo.ls(D, stree=NULL, set.neg.to.zero=TRUE, fixed=FALSE,
   tol=1e-10, collapse=TRUE)

Arguments

D

a distance matrix.

stree

an optional starting tree for the optimization.

set.neg.to.zero

a logical value indicating whether to set negative branch lengths to zero (default TRUE).

fixed

a logical value indicating whether to estimate the topology - if TRUE only the branch lengths will be computed.

tol

a tolerance value used to assess whether the optimization has converged.

collapse

a logical indicating whether to collapse branches with zero length.

Details

Function uses nni from the phangorn package (Schliep 2011) to conduct NNIs for topology estimation.

Since topology optimization is performed using NNIs, convergence to the true least-squares topology is not guaranteed. It is consequently probably wise to start with a very good tree - such as a NJ tree.

Value

An object of class "phylo" that (may be) the least-squares tree with branch lengths; also returns the sum of squares in attr(tree,"Q-score").

Author(s)

Liam Revell liam.revell@umb.edu

References

Cavalli-Sforza, L. L., and A. W. F. Edwards. (1967) Phylogenetic analysis: Models and estimation procedures. American Journal of Human Genetics, 19, 233-257.

Felsenstein, J. (2004) Inferring Phylogenies. Sinauer.

Paradis, E., J. Claude, and K. Strimmer. (2004) APE: Analyses of phylogenetics and evolution in R language. Bioinformatics, 20, 289-290.

Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.

Schliep, K. P. (2011) phangorn: phylogenetic analysis in R. Bioinformatics, 27, 592-593.

See Also

exhaustiveMP, nni


phytools documentation built on June 22, 2024, 10:39 a.m.