Learn R Programming

BMhyd (version 1.2-8)

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 functon 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 and the C matrix is good for further use.

References

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

Examples

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

Run the code above in your browser using DataLab