mccrTest: Conduct monte carlo constant rates (gamma statistic) test

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Conducts gamma statistic analysis (Pybus and Harvey 2000) for incompletely sampled phylogenies. Phylogenies are simulated to the full clade size under the null hypothesis (constant rate pure birth diversification process) and taxa are randomly pruned from the tree to mimic incomplete sampling. The null distribution of the gamma statistic is then tabulated from these phylogenies.

Usage

1
mccrTest(CladeSize, NumberMissing, NumberOfReps, ObservedGamma = NULL, fname=NULL)

Arguments

CladeSize

The TRUE clade diversity

NumberMissing

The number of missing species, e.g., CladeSize minus the number of taxa in your tree

NumberOfReps

The number of Monte Carlo simulations to conduct. Recommend >= 5000

ObservedGamma

The observed gamma statistic value for the empirical tree. Optional.

fname

An optional filename where simulated trees are stored, if you generated the trees in another program, such as phylogen

Details

If ObservedGamma is supplied, mccrTest returns the p-value.

Value

A list with the following components:

null.gamma

The null distribution of gamma. You can plot a histogram or otherwise inspect these values...

critical.value

The 0.05 percentile of the null distribution. This is the value corresponding to alpha = 0.05

p.value

The actual p-value, only returned if ObservedGamma is supplied by user

Author(s)

Dan Rabosky drabosky@umich.edu

References

Pybus, O. G. and Harvey, P. H. 2000. Testing macro-evolutionary models using incomplete molecular phylogenies. Proceedings of the Royal Society of London. Series B. Biological Sciences, 267, 2267-2272.

See Also

gamStat

Examples

1
 	mccrTest(CladeSize=25, NumberMissing=5, NumberOfReps=50);

Example output

Loading required package: ape
Loading required package: geiger
$null.gamma
 [1] -1.327773042  0.701091709  0.703350873 -0.284268993  0.209229167
 [6] -1.582354745 -0.032823643 -1.531462899 -1.047332704  0.670828054
[11]  0.688220393  0.297135828  0.624089139  1.491232644 -0.427680770
[16] -0.456053458  0.508440765 -0.207115075  0.488184326  0.337198702
[21] -0.425303481 -1.904458112  0.509387580 -0.162852420  1.015967825
[26] -0.635604699  0.546585304 -1.412061467  1.651687376 -0.229789814
[31] -0.698992318 -1.784671081 -0.678304027 -0.158160065  1.148201220
[36]  0.091131260 -0.606216054  0.523006817 -0.085910577  0.396579048
[41] -1.177429958 -0.694276626 -0.456954407  0.003161235 -1.098597969
[46]  0.210201158 -1.928142883 -0.821864612 -1.595797275  0.389938604

$critical.value
[1] -1.699678

laser documentation built on Jan. 15, 2017, 4:49 p.m.