EVOLUTION-MANAGER
Edit File: qq.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: Quantile-Quantile Plots of Two Samples</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 B_05_qq {lattice}"><tr><td>B_05_qq {lattice}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Quantile-Quantile Plots of Two Samples </h2> <h3>Description</h3> <p>Quantile-Quantile plots for comparing two Distributions </p> <h3>Usage</h3> <pre> qq(x, data, ...) ## S3 method for class 'formula' qq(x, data, aspect = "fill", panel = lattice.getOption("panel.qq"), prepanel, scales, strip, groups, xlab, xlim, ylab, ylim, f.value = NULL, drop.unused.levels = lattice.getOption("drop.unused.levels"), ..., lattice.options = NULL, qtype = 7, default.scales = list(), default.prepanel = lattice.getOption("prepanel.default.qq"), subscripts, subset) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>The object on which method dispatch is carried out. </p> <p>For the <code>"formula"</code> method, <code>x</code> should be a formula of the form <code>y ~ x | g1 * g2 * ...</code>, where <code>x</code> should be a numeric variable, and <code>y</code> a factor, shingle, character, or numeric variable, with the restriction that there must be exactly two levels of <code>y</code>, which divide the values of <code>x</code> into two groups. Quantiles for these groups will be plotted against each other along the two axes. </p> </td></tr> <tr valign="top"><td><code>data</code></td> <td> <p>For the <code>formula</code> method, an optional data source (usually a data frame) in which variables are to be evaluated (see <code><a href="xyplot.html">xyplot</a></code> for details). </p> </td></tr> <tr valign="top"><td><code>f.value</code></td> <td> <p>An optional numeric vector of probabilities, quantiles corresponding to which should be plotted. This can also be a function of a single integer (representing sample size) that returns such a numeric vector. A typical value for this argument is the function <code>ppoints</code>, which is also the S-PLUS default. If specified, the probabilities generated by this function is used for the plotted quantiles, through the <code>quantile</code> function. </p> <p><code>f.value</code> defaults to <code>NULL</code>, which is equivalent to </p> <pre> f.value = function(n) ppoints(n, a = 1) </pre> <p>This has the effect of including the minimum and maximum data values in the computed quantiles. This is similar to what happens for <code>qqplot</code> but different from the default behaviour of <code>qq</code> in S-PLUS. </p> <p>For large <code>x</code>, this argument can be used to restrict the number of quantiles plotted. </p> </td></tr> <tr valign="top"><td><code>panel</code></td> <td> <p>A function, called once for each panel, that uses the packet (subset of panel variables) corresponding to the panel to create a display. The default panel function <code><a href="panel.xyplot.html">panel.qq</a></code> is documented separately, and has arguments that can be used to customize its output in various ways. Such arguments can usually be directly supplied to the high-level function. </p> </td></tr> <tr valign="top"><td><code>qtype</code></td> <td> <p> The <code>type</code> argument for <code><a href="../../stats/html/quantile.html">quantile</a></code>. </p> </td></tr> <tr valign="top"><td><code>aspect</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>prepanel</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>scales</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>strip</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>groups</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>xlab, ylab</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>xlim, ylim</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>drop.unused.levels</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>lattice.options</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>default.scales</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>subscripts</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>subset</code></td> <td> <p> See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>default.prepanel</code></td> <td> <p>Fallback prepanel function. See <code><a href="xyplot.html">xyplot</a></code>. </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Further arguments. See corresponding entry in <code><a href="xyplot.html">xyplot</a></code> for non-trivial details. </p> </td></tr> </table> <h3>Details</h3> <p><code>qq</code> produces Q-Q plots of two samples. The default behaviour of <code>qq</code> is different from the corresponding S-PLUS function. See the entry for <code>f.value</code> for specifics. </p> <p>This and all other high level Trellis functions have several arguments in common. These are extensively documented only in the help page for <code>xyplot</code>, which should be consulted to learn more detailed usage. </p> <h3>Value</h3> <p>An object of class <code>"trellis"</code>. The <code><a href="update.trellis.html">update</a></code> method can be used to update components of the object and the <code><a href="print.trellis.html">print</a></code> method (usually called by default) will plot it on an appropriate plotting device. </p> <h3>Author(s)</h3> <p>Deepayan Sarkar <a href="mailto:Deepayan.Sarkar@R-project.org">Deepayan.Sarkar@R-project.org</a></p> <h3>See Also</h3> <p><code><a href="xyplot.html">xyplot</a></code>, <code><a href="panel.xyplot.html">panel.qq</a></code>, <code><a href="qqmath.html">qqmath</a></code>, <code><a href="Lattice.html">Lattice</a></code> </p> <h3>Examples</h3> <pre> qq(voice.part ~ height, aspect = 1, data = singer, subset = (voice.part == "Bass 2" | voice.part == "Tenor 1")) </pre> <hr /><div style="text-align: center;">[Package <em>lattice</em> version 0.20-38 <a href="00Index.html">Index</a>]</div> </body></html>