getDataLikelihood: Likelihood of tip trait values.

getDataLikelihoodR Documentation

Likelihood of tip trait values.

Description

Computes -log( likelihood ) of tip trait data under a given set of parameters, and for a specified model of trait evolution.

Usage

getDataLikelihood(object, data, error, params, v)

Arguments

object

an object of class 'PhenotypicModel'.

data

vector of tip trait data.

error

vector of intraspecific (i.e., tip-level) standard error of the mean. Specify NULL if no error data are available.

params

vector of parameters, given in the same order as in the 'model' object.

v

boolean specifying the verbose mode. Default value : FALSE.

Value

A numerical value : -log( likelihood ) of the model.

Author(s)

M Manceau

References

Manceau M., Lambert A., Morlon H. (2017) A unifying comparative phylogenetic framework including traits coevolving across interacting lineages Systematic Biology

Examples

#Loading an example tree
newick <- "((((A:1,B:0.5):2,(C:3,D:2.5):1):6,E:10.25):2,(F:6.5,G:8.25):3):1;"
tree <- read.tree(text=newick)

#Creating the models
modelBM <- createModel(tree, 'BM')

#Simulating tip traits under the model :
dataBM <- simulateTipData(modelBM, c(0,0,0,1))

#Likelihood of the data :
getDataLikelihood(modelBM, dataBM, error=NULL, c(0,0,0,1))

hmorlon/PANDA documentation built on April 24, 2024, 3:27 a.m.