OU.invgamma.like.norm: Calculate the likelihood of normalized comparative data as...

Description Usage Arguments Value Examples

View source: R/brownian_motion_package.r

Description

This function calculates the likelihood of the observed trait data assuming that each trait evolves according to an independent Ornstein Ulenbeck processes with inverse gamma distributed rates. The data are normalized relative to the trait values in a specified species.

Usage

1
OU.invgamma.like.norm(phy, dat, alpha, beta, theta, norm = 1)

Arguments

phy

an ape format phylogeny on which to simulate

dat

a matrix of comparative data, in which rows correspond to species and columns correspond to traits

alpha

the shape parameter of the inverse gamma distribution

beta

the scale parameter of the inverse gamma distribution

theta

the constraint parameter of the Ornstein-Uhlenbeck process

norm

the species by which all the data is normalized

Value

A vector, with the likelihood of each gene the observed data

Examples

1
2
3
data(yeast)
sim.dat = OU.invgamma.sim.group(yeast.tree,2,2,2,10)
OU.invgamma.like.norm(yeast.tree,sim.dat,2,2,2)

PIGShift documentation built on May 2, 2019, 9:02 a.m.