Learn R Programming

ouxy (version 2.1)

OUprior: Fit OU model for univariate data

Description

Fit OU model given tree and trait

Usage

OUprior(tree = tree, trait = trait, model = model)

Arguments

tree

An ape: tree object stored in phylo format

trait

a univaraite trait

model

specified model preset "OU".

Value

MLE parameter estimates \(\alpha, \theta, \sigma^2\).

Details

Parameter estimates \(\alpha, \theta, \sigma^2\) are estimated by BM (when \(\alpha = 0\)) or OU model from geiger for the next step analysis with function HyperParam to get the reasonable range of the hyper parameter as well as the ancestral value.

References

  1. Jhwueng, D-C. (2019) Statistical modeling for adaptive trait evolution. Under review.

  2. Jhwueng, D-C., and Vasileios Maroulas. "Adaptive trait evolution in random environment." Journal of Applied Statistics 43.12 (2016): 2310-2324.

  3. Hansen, Thomas F., Jason Pienaar, and Steven Hecht Orzack. "A comparative method for studying adaptation to a randomly evolving environment." Evolution: International Journal of Organic Evolution 62.8 (2008): 1965-1977.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
library(ape)
tree<-rcoal(3)
trait<-rnorm(3)
names(trait)<-tree$tip.label
model <- "OU"
OUprior(tree=tree,trait=trait,model=model)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab