Description Usage Arguments Value Examples
View source: R/brownian_motion_package.r
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.
1 | norminvgamma.shift.like.norm(phy, dat, alpha, beta, rates, norm = 1)
|
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 |
A vector, with the likelihood of each gene the observed data
1 2 3 | data(yeast)
sim.dat = norminvgamma.shift.sim.group(yeast.tree,2,2,rep(1,6),10)
norminvgamma.shift.like.norm(yeast.tree,sim.dat,2,2,rep(1,6))
|
[1] -4.169833 -3.127241 -3.187612 -1.570510 -5.641061 -3.067179 -3.286148
[8] -2.343467 -3.937125 -7.378375
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.