fix.kappa | R Documentation |
Iteratively deletes taxa with shortest tip length to try to get a variance covariance matrix with good matrix condition.
fix.kappa(phy, data, threshold = log(40))
phy |
a phylogenetic tree, in |
data |
a data.frame containing species information (see Details). |
threshold |
log(condition), as measured by kappa(), which is too large |
Internally, OUwie uses an algorithm that can perform poorly when the variance covariance matrix is poorly conditioned (which can happen if two columns are very similar, as when the divergence depth of two species is very recent). This does not mean there is anything wrong with the biology, just that the numerical algorithms perform poorly in that case. If it's a model that can be fit in phylolm or geiger, those packages use a differnt algorithm that is more robust to this. What this function does is take your original tree and data and deletes taxa with the shortest branches, in order, to try to get a starting tree with generally good condition. Deleting data is always a sad thing, but this can result in a more accurate estimate of the likelihood and parameter values.
This returns a list with two elements:
$phy |
the phylogeny with taxa deleted. |
$data |
the data with taxa deleted. |
Brian C. O'Meara
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.