norminvgamma.shift.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 Brownian motion with inverse gamma distributed rates. The data are normalized relative to the trait values in a specified species.

Usage

1
norminvgamma.shift.like.norm(phy, dat, alpha, beta, rates, 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

rates

a vector of rates for each branch of the phylogeny. The order of elements in rates shoud correspond to the order of phy$branches

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

Example output

 [1] -4.169833 -3.127241 -3.187612 -1.570510 -5.641061 -3.067179 -3.286148
 [8] -2.343467 -3.937125 -7.378375

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