OU1d.loglik | R Documentation |
computes log likelihood of an one-dimensional Ornstein-Uhlenbeck model with an algorithm that is linear in the number of tips in the tree.
OU1d.loglik(trait, phy, model = c("OUrandomRoot", "OUfixedRoot"), parameters = NULL)
trait |
a vector of trait values. |
phy |
a phylogenetic tree of type phylo with branch lengths. |
model |
an Ornstein-Uhlenbeck model. |
parameters |
List of parameters for the model |
Lam Si Tung Ho
tr = rtree(100)
alpha = 1
sigma2 = 1
sigma2_error = 0.5
ancestral.state = 0
optimal.value = 1
trait = rTrait(n = 1, tr, model = "OU",
parameters = list(ancestral.state=ancestral.state, alpha=alpha,
sigma2=sigma2,sigma2_error=sigma2_error,
optimal.value=optimal.value))
OU1d.loglik(trait=trait, phy=tr, model="OUfixedRoot",
parameters=list(ancestral.state=ancestral.state, alpha=alpha,sigma2=sigma2,
sigma2_error=sigma2_error,optimal.value=optimal.value))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.