EVOLUTION-MANAGER
Edit File: ppoints.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: Ordinates for Probability Plotting</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 ppoints {stats}"><tr><td>ppoints {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Ordinates for Probability Plotting</h2> <h3>Description</h3> <p>Generates the sequence of probability points <code>(1:m - a)/(m + (1-a)-a)</code> where <code>m</code> is either <code>n</code>, if <code>length(n)==1</code>, or <code>length(n)</code>. </p> <h3>Usage</h3> <pre> ppoints(n, a = if(n <= 10) 3/8 else 1/2) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>n</code></td> <td> <p>either the number of points generated or a vector of observations.</p> </td></tr> <tr valign="top"><td><code>a</code></td> <td> <p>the offset fraction to be used; typically in <i>(0,1)</i>.</p> </td></tr> </table> <h3>Details</h3> <p>If <i>0 < a < 1</i>, the resulting values are within <i>(0,1)</i> (excluding boundaries). In any case, the resulting sequence is symmetric in <i>[0,1]</i>, i.e., <code>p + rev(p) == 1</code>. </p> <p><code>ppoints()</code> is used in <code>qqplot</code> and <code>qqnorm</code> to generate the set of probabilities at which to evaluate the inverse distribution. </p> <p>The choice of <code>a</code> follows the documentation of the function of the same name in Becker <em>et al</em> (1988), and appears to have been motivated by results from Blom (1958) on approximations to expect normal order statistics (see also <code><a href="quantile.html">quantile</a></code>). </p> <p>The probability points for the continuous sample quantile types 5 to 9 (see <code><a href="quantile.html">quantile</a></code>) can be obtained by taking <code>a</code> as, respectively, 1/2, 0, 1, 1/3, and 3/8. </p> <h3>References</h3> <p>Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <em>The New S Language</em>. Wadsworth & Brooks/Cole. </p> <p>Blom, G. (1958) <em>Statistical Estimates and Transformed Beta Variables.</em> Wiley </p> <h3>See Also</h3> <p><code><a href="qqnorm.html">qqplot</a></code>, <code><a href="qqnorm.html">qqnorm</a></code>. </p> <h3>Examples</h3> <pre> ppoints(4) # the same as ppoints(1:4) ppoints(10) ppoints(10, a = 1/2) ## Visualize including the fractions : require(graphics) p.ppoints <- function(n, ..., add = FALSE, col = par("col")) { pn <- ppoints(n, ...) if(add) points(pn, pn, col = col) else { tit <- match.call(); tit[[1]] <- quote(ppoints) plot(pn,pn, main = deparse(tit), col=col, xlim = 0:1, ylim = 0:1, xaxs = "i", yaxs = "i") abline(0, 1, col = adjustcolor(1, 1/4), lty = 3) } if(!add && requireNamespace("MASS", quietly = TRUE)) text(pn, pn, as.character(MASS::fractions(pn)), adj = c(0,0)-1/4, cex = 3/4, xpd = NA, col=col) abline(h = pn, v = pn, col = adjustcolor(col, 1/2), lty = 2, lwd = 1/2) } p.ppoints(4) p.ppoints(10) p.ppoints(10, a = 1/2) p.ppoints(21) p.ppoints(8) ; p.ppoints(8, a = 1/2, add=TRUE, col="tomato") </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>