oubmTrait: Parameter samples and summary statistics

Description Usage Arguments Details Value Examples

View source: R/ouxy.r

Description

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

Usage

1
oubmTrait(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

Details

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

Value

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

Examples

1
2
3
4
5
6
7
## using bat dataset (running time more > 5 sec)

data(bat)
tree<-bat$tree
traitset<-bat$traitset
sims<-10
oubmTrait(tree=tree,traitset=traitset,sims=sims)

ouxy documentation built on July 2, 2020, 4:05 a.m.

Related to oubmTrait in ouxy...