getAncLiks: Returns ancestral likelihoods at each node. Based on code...

View source: R/RERfuncs.R

getAncLiksR Documentation

Returns ancestral likelihoods at each node. Based on code from ace in ape and fitMk/rerootingMethod in phytools

Description

Returns ancestral likelihoods at each node. Based on code from ace in ape and fitMk/rerootingMethod in phytools

Usage

getAncLiks(tree, tipvals, Q = NULL, rate_model = "ER", root_prior = "auto")

Arguments

tree

Object of class phylo that has been pruned to only contain the species in tipvals

tipvals

The phenotype data for the extant species in the tree in the same order as tree$tip.label and mapped to integers

Q

A transition matrix, if NULL the transition matrix is fit with fit_mk from castor package

rate_model

The rate model to use for fitting the transition matrix if one is not provided

root_prior

The root prior used when fitting the transition matrix if one is not provided

Value

The ancestral likelihoods at each node in the tree


nclark-lab/RERconverge documentation built on March 2, 2024, 8:51 a.m.