EVOLUTION-MANAGER
Edit File: SignRank.html
<!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: Distribution of the Wilcoxon Signed Rank Statistic</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for SignRank {stats}"><tr><td>SignRank {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Distribution of the Wilcoxon Signed Rank Statistic</h2> <h3>Description</h3> <p>Density, distribution function, quantile function and random generation for the distribution of the Wilcoxon Signed Rank statistic obtained from a sample with size <code>n</code>. </p> <h3>Usage</h3> <pre> dsignrank(x, n, log = FALSE) psignrank(q, n, lower.tail = TRUE, log.p = FALSE) qsignrank(p, n, lower.tail = TRUE, log.p = FALSE) rsignrank(nn, n) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x, q</code></td> <td> <p>vector of quantiles.</p> </td></tr> <tr valign="top"><td><code>p</code></td> <td> <p>vector of probabilities.</p> </td></tr> <tr valign="top"><td><code>nn</code></td> <td> <p>number of observations. If <code>length(nn) > 1</code>, the length is taken to be the number required.</p> </td></tr> <tr valign="top"><td><code>n</code></td> <td> <p>number(s) of observations in the sample(s). A positive integer, or a vector of such integers.</p> </td></tr> <tr valign="top"><td><code>log, log.p</code></td> <td> <p>logical; if TRUE, probabilities p are given as log(p).</p> </td></tr> <tr valign="top"><td><code>lower.tail</code></td> <td> <p>logical; if TRUE (default), probabilities are <i>P[X ≤ x]</i>, otherwise, <i>P[X > x]</i>.</p> </td></tr> </table> <h3>Details</h3> <p>This distribution is obtained as follows. Let <code>x</code> be a sample of size <code>n</code> from a continuous distribution symmetric about the origin. Then the Wilcoxon signed rank statistic is the sum of the ranks of the absolute values <code>x[i]</code> for which <code>x[i]</code> is positive. This statistic takes values between <i>0</i> and <i>n(n+1)/2</i>, and its mean and variance are <i>n(n+1)/4</i> and <i>n(n+1)(2n+1)/24</i>, respectively. </p> <p>If either of the first two arguments is a vector, the recycling rule is used to do the calculations for all combinations of the two up to the length of the longer vector. </p> <h3>Value</h3> <p><code>dsignrank</code> gives the density, <code>psignrank</code> gives the distribution function, <code>qsignrank</code> gives the quantile function, and <code>rsignrank</code> generates random deviates. </p> <p>The length of the result is determined by <code>nn</code> for <code>rsignrank</code>, and is the maximum of the lengths of the numerical arguments for the other functions. </p> <p>The numerical arguments other than <code>nn</code> are recycled to the length of the result. Only the first elements of the logical arguments are used. </p> <h3>Author(s)</h3> <p>Kurt Hornik; efficiency improvement by Ivo Ugrina.</p> <h3>See Also</h3> <p><code><a href="wilcox.test.html">wilcox.test</a></code> to calculate the statistic from data, find p values and so on. </p> <p><a href="Distributions.html">Distributions</a> for standard distributions, including <code><a href="Wilcoxon.html">dwilcox</a></code> for the distribution of <em>two-sample</em> Wilcoxon rank sum statistic. </p> <h3>Examples</h3> <pre> require(graphics) par(mfrow = c(2,2)) for(n in c(4:5,10,40)) { x <- seq(0, n*(n+1)/2, length = 501) plot(x, dsignrank(x, n = n), type = "l", main = paste0("dsignrank(x, n = ", n, ")")) } </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>