<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Population Parameter THETA using Segregating Sites</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="https://rpkg.net/assets/examples.css" />
</head><body>

<table width="100%" summary="page for theta.s"><tr><td>theta.s</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Population Parameter THETA using Segregating Sites</h2>

<h3>Description</h3>

<p>This function computes the population parameter THETA using the
number of segregating sites <i>s</i> in a sample of <i>n</i> DNA sequences.
</p>


<h3>Usage</h3>

<pre>
theta.s(x, ...)
## S3 method for class 'DNAbin'
theta.s(x, variance = FALSE, ...)
## Default S3 method:
theta.s(x, n, variance = FALSE, ...)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
<p>a numeric giving the number of segregating sites.</p>
</td></tr>
<tr valign="top"><td><code>n</code></td>
<td>
<p>a numeric giving the number of sequences.</p>
</td></tr>
<tr valign="top"><td><code>variance</code></td>
<td>
<p>a logical indicating whether the variance of the
estimated THETA should be returned (<code>TRUE</code>), the default being
<code>FALSE</code>.</p>
</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
<p>arguments passed to methods.</p>
</td></tr>
</table>


<h3>Value</h3>

<p>A numeric vector of length one with the estimated theta (the default),
or of length two if the standard error is returned
(<code>variance = TRUE</code>).
</p>


<h3>Author(s)</h3>

<p>Emmanuel Paradis</p>


<h3>References</h3>

<p>Watterson, G. A. (1975) On the number of segragating sites in genetical
models without recombination. <em>Theoretical Population Biology</em>,
<b>7</b>, 256&ndash;276.
</p>
<p>Tajima, F. (1989) Statistical method for testing the neutral mutation
hypothesis by DNA polymorphism. <em>Genetics</em>, <b>123</b>, 585&ndash;595.
</p>


<h3>See Also</h3>

<p><code>theta.h</code>, <code>theta.k</code>,
<code>seg.sites</code>, <code>nuc.div</code>, <code>theta.tree</code>
</p>


<h3>Examples</h3>

<pre>
data(woodmouse)
theta.s(woodmouse)
theta.s(woodmouse, variance = TRUE)
## using the default:
s &lt;- length(seg.sites(woodmouse))
n &lt;- nrow(woodmouse)
theta.s(s, n)
</pre>


</body></html>
