Learn R Programming

ouxy (version 2.1)

ououcirTrait: Parameter samples and summary statistics

Description

Draw sample for parameters, simulate trait and compute the summary statistics for OUOUCIR model

Usage

ououcirTrait(tree = tree, traitset = traitset, sims = sims)

Arguments

tree

An ape: tree object stored in phylo format

traitset

a dataframe that contains 3 traits

sims

number of trait replicate

Value

A list of vectors containing a dataframe of summary statistics, and a dataframe of parameter samples

Details

Given tree, trait sets, function HyperParam is called to yield the range of parameters, then function oubmbmprior is called to draw sample for parameter, then the function oubmbmmodel is applied to simulate traits through post order tree traversal algorithm, finally the summary statistics is computed by function sumstat.

Examples

Run this code
# NOT RUN {
## using bat dataset (running time more > 5 sec)
# }
# NOT RUN {
data(bat)
tree<-bat$tree
traitset<-bat$traitset
sims<-10
ououcirTrait(tree=tree,traitset=traitset,sims=sims)
# }

Run the code above in your browser using DataLab