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

theta.s

Population Parameter THETA using Segregating Sites


Description

This function computes the population parameter THETA using the number of segregating sites s in a sample of n DNA sequences.

Usage

theta.s(x, ...)
## S3 method for class 'DNAbin'
theta.s(x, variance = FALSE, ...)
## Default S3 method:
theta.s(x, n, variance = FALSE, ...)

Arguments

x

a numeric giving the number of segregating sites.

n

a numeric giving the number of sequences.

variance

a logical indicating whether the variance of the estimated THETA should be returned (TRUE), the default being FALSE.

...

arguments passed to methods.

Value

A numeric vector of length one with the estimated theta (the default), or of length two if the standard error is returned (variance = TRUE).

Note

The number of segregating sites needs to be computed beforehand, for instance with the function seg.sites (see example below).

Author(s)

Emmanuel Paradis

References

Watterson, G. A. (1975) On the number of segragating sites in genetical models without recombination. Theoretical Population Biology, 7, 256–276.

Tajima, F. (1989) Statistical method for testing the neutral mutation hypothesis by DNA polymorphism. Genetics, 123, 585–595.

See Also

Examples

data(woodmouse)
theta.s(woodmouse)
theta.s(woodmouse, variance = TRUE)
## using the default:
s <- length(seg.sites(woodmouse))
n <- nrow(woodmouse)
theta.s(s, n)

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.