Learn R Programming

BMhyb (version 1.5.2)

DetPass: determinant of the matrix

Description

Calculate the determinant of the matrix and check whether it is positive.

Usage

DetPass(phy)

Arguments

phy

an object of class 'phylo'.

Value

a TRUE/FALSE value.

Details

This function first calculates variance covariance matrix C for the tree. It then calculates the determinant of the C, 0.0001*C, and 1000*C and verifies whether all the three determinants are positive and finite. If yes, a TRUE value is return which indicates that the C matrix is good for further use.

References

Jhwueng D.C. and O'Meara B.C. 2016. Studying trait evolution on phylogenetic networks. Submitted.

Examples

Run this code
# NOT RUN {
	library(ape)
	##simulate a tree of 5 taxa
	phy<-rtree(5)
	#check whether the determiant is positive
	DetPass(phy)
	
# }

Run the code above in your browser using DataLab