OU.lik: Function for calculating likelihood of an OU model in bayou...

Description Usage Arguments Details Value

View source: R/bayou-likelihood.R View source: R/bayou-likelihood.R


Function for calculating likelihood of an OU model in bayou using pruning algorithm or matrix inversion


OU.lik(pars, tree, X, SE = 0, model = "OU", invert = FALSE)



A list of parameters to calculate the likelihood


A phylogenetic tree of class 'phylo'


A named vector giving the tip data


A named vector or single number giving the standard errors of the data


Parameterization of the OU model. Either "OU", "QG" or "OUrepar".


A logical indicating whether the likelihood should be solved by matrix inversion, rather than the pruning algorithm. This is primarily present to test that calculation of the likelihood is correct.


This function can be used for calculating single likelihoods using previously implemented methods. It is likely to become deprecated and replaced by bayou.lik in the future, which is based on phylolm's threepoint algorithm, which works on non-ultrametric trees and is substantially faster.


A list returning the log likelihood ("loglik"), the weight matrix ("W"), the optima ("theta"), the residuals ("resid") and the expected values ("Exp").

bayou documentation built on May 19, 2017, 1:18 p.m.
Search within the bayou package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.