PCMPresentCoordinates.Rd
For every node (root, internal or tip) in tree, build a logical vector of length k with TRUE values for every present coordinate. Non-present coordinates arize from NA-values in the trait data. These can occur in two cases:
the present coordinates are FALSE for the corresponding tip and trait, but are full for all traits at all internal and root nodes.
the FALSE present coordinates propagate towards the parent nodes - an internal or root node will have a present coordinate set to FALSE for a given trait, if all of its descendants have this coordinate set to FALSE.
These two cases have different effect on the likelihood calculation: missing measurements (NA) are integrated out at the parent nodes; while non-existent traits (NaN) are treated as reduced dimensionality of the vector at the parent node.
PCMPresentCoordinates(X, tree, metaI)
X | numeric k x N matrix of observed values, with possible NA entries. The columns in X are in the order of tree$tip.label |
---|---|
tree | a phylo object |
metaI | The result of calling PCMInfo. |
a k x M logical matrix. The function fails in case when all traits are NAs for some of the tips. In that case an error message is issued "PCMPresentCoordinates:: Some tips have 0 present coordinates. Consider removing these tips.".