relaxedClockTest: Use parametric bootstrap to test if relaxed clock offers...

Description Usage Arguments Details Value Author(s) Examples

View source: R/boot.R

Description

This function simulates phylogenies with branch lengths in units of substitutions per site. Simulations are based on a fitted treedater object which provides parameters of the molecular clock model. The coefficient of variation of rates is estimated using a relaxed clock model applied to strict clock simulations. Estimates of the CV is then compared to the null distribution provided by simulations.

Usage

1
2
relaxedClockTest(..., nreps = 100, overrideTempConstraint = T,
  ncpu = 1)

Arguments

...

arguments passed to *dater*

nreps

Integer number of simulations

overrideTempConstraint

see *parboot*

ncpu

Number of threads to use for parallel computation. Recommended.

Details

This function will print the optimal clock model and the distribution of the coefficient of variation statistic under the null hypothesis (strict clock). Parameters passed to this function should be the same as when calling *dater*.

Value

A list with elements:

Author(s)

Erik M Volz <erik.volz@gmail.com>

Examples

1
2
3
4
5
6
7
# simulate a tree 
tre <- ape::rtree(25)
# sample times based on distance from root to tip:
sts <- setNames( ape::node.depth.edgelength( tre )[1:ape::Ntip(tre)], tre$tip.label)
# modify edge length to represent evolutionary distance with rate 1e-3:
tre$edge.length <- tre$edge.length * 1e-3
relaxedClockTest( tre, sts, s= 1000,  omega0=.0015 , nreps=25)

emvolz-phylodynamics/treedater-dev documentation built on Jan. 28, 2020, 6:05 p.m.