Description Usage Arguments Details Value Author(s) Examples

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.

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

`...` |
arguments passed to *dater* |

`nreps` |
Integer number of simulations |

`overrideTempConstraint` |
see *parboot* |

`ncpu` |
Number of threads to use for parallel computation. Recommended. |

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*.

A list with elements:

strict_treedater: A dater object under a strict clock

relaxed_treedater: A dater object under a relaxed clock

clock: The favoured clock model

parboot: Result of call to *parboot* using fitted treedater and forcing a relaxed clock

nullHypothesis_coef_of_variation_CI: The null hypothesis CV

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

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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.