AdjustForDet: Adjust the phylogeny

Description Usage Arguments Details Value Author(s) References Examples

Description

A function adjusts the phylogeny when the determinant of the variance covariance matrix of the the phylogeny is negative.

Usage

1
2
	AdjustForDet(phy, max.attempts=100)
	

Arguments

phy

an object of class 'phylo'

max.attempts

the maximum numer of attempts to adjust the phylogeny. The default is 100.

Details

This functon first calculates the determiant of the phylogeny using the function DetPass. When the determinant of the variance covariance matrix for the phylogeny is negative, this function will adjust the phylogeny by slightly lengthening the edge lengths of the tree. This procedure repeats until a good adjusted phylogeny is returned.

Value

an object of class 'phylo'

Author(s)

Brian O'Meara, Dwueng-Chwuan Jhwueng.

References

Jhwueng D.C. and O'Meara B.C. 2015. Studying trait evolution in hybrid species on phylogenetic networks. Submitted.

Examples

1
2
3
4
5
6
	library(ape)
	#simulate a tree of 5 taxa
	phy<-rtree(5)
	#check and adjust the phylogeny
	AdjustForDet(phy,max.attempts=100)
	

BMhyd documentation built on May 2, 2019, 8:27 a.m.

Related to AdjustForDet in BMhyd...