Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

R2.test

Ramos-Onsins–Rozas Test of Neutrality


Description

This function computes Ramos-Onsins and Rozas's test of neutrality for a set of DNA sequences.

Usage

R2.test(x, B = 1000, theta = 1, plot = TRUE, quiet = FALSE, ...)

Arguments

x

a DNA matrix (object of class "DNAbin").

B

the number of replicates used for the simulation procedure.

theta

the value of the theta population parameter used in the simulation.

plot

a logical value specifying whether to plot the results (TRUE by default).

quiet

a logical value specifying whether to not display the progress of the simulations. The default is FALSE meaning that a progress bar is displayed by default.

...

further arguments passed to hist.

Value

a list with two elements: R2 the value of the test statistic R_2, and P.val the associated P-value. If B = 0 a single value, the test statistic, is returned

Note

The simulation procedure probably needs to be tested and improved. However the results make sense so far.

Author(s)

Emmanuel Paradis

References

Ramos-Onsins, R. and Rozas, R. (2002) Statistical properties of new neutrality tests against population growth. Molecular Biology and Evolution, 19, 2092–2100.

Sano, J. and Tachida, G. (2005) Gene genealogy and properties of test statistics of neutrality under population growth. Genetics, 169, 1687–1697.

See Also

Examples

data(woodmouse)
R2.test(woodmouse, quiet = TRUE)

pegas

Population and Evolutionary Genetics Analysis System

v1.0
GPL (>= 2)
Authors
Emmanuel Paradis [aut, cre, cph] (<https://orcid.org/0000-0003-3092-2199>), Thibaut Jombart [aut, cph] (<https://orcid.org/0000-0003-2226-8692>), Zhian N. Kamvar [aut, cph] (<https://orcid.org/0000-0003-1458-7108>), Brian Knaus [aut, cph] (<https://orcid.org/0000-0003-1665-4343>), Klaus Schliep [aut, cph] (<https://orcid.org/0000-0003-2941-0161>), Alastair Potts [aut, cph] (<https://orcid.org/0000-0003-0919-7279>), David Winter [aut, cph] (<https://orcid.org/0000-0002-6165-0029>)
Initial release
2021-04-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.