AttemptDeletionFix: Delete taxa to improve matrix condition

Description Usage Arguments Details Value Author(s) References Examples

View source: R/bmhyb.r

Description

This will delete a taxon or taxa not involved as a source of hybrid gene flow or recipient of gene flow to see if this fixes a network that is not positive definite. It's drastic action.

Usage

1
2
	AttemptDeletionFix(phy, flow, params=c(1,0,0.1, 0, 0), m.vector = c(1,2))
	

Arguments

phy

an object of class 'phylo'.

flow

the flow matrix

params

parameters to use for creating the modified variance covariance matrix

m.vector

how many taxa to try deleting.

Details

m.vector=c(1,2) means it will try deleting a single taxon at random; if it works, stop there, if not, replace that one and delete another, until all single taxon deletions have been tried. Then it'll repeat for all possible pairs of taxa. You can add on to this (all groups of three taxa, etc.) though the space of things to try gets very large.

Value

an object of class 'phylo'.

Author(s)

Brian O'Meara, Dwueng-Chwuan Jhwueng.

References

Jhwueng D.C. and O'Meara B.C. 2016. 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)
	

bomeara/BMhyb documentation built on Oct. 8, 2017, 9:45 a.m.