Rev 4211 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{B_05_qq}\alias{qq}\alias{qq.formula}\title{ Quantile-Quantile Plots of Two Samples }\description{Quantile-Quantile plots for comparing two Distributions}\usage{qq(x, data, \dots)\method{qq}{formula}(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"),\dots,lattice.options = NULL,qtype = 7,default.scales = list(),subscripts,subset)}\arguments{\item{x}{The object on which method dispatch is carried out.For the formula method, a formula of the form \code{y ~ x | g1 * g2* \ldots}, where \code{x} must be a numeric, and \code{y} can be afactor, shingle, character or numeric vector, with the restrictionthat there must be exactly two levels of \code{y}, which divide thevalues of \code{x} into two groups. Quantiles for these groups willbe plotted along the two axes.}\item{data}{For the \code{formula} methods, an optional data frame in whichvariables in the formula (as well as \code{groups} and\code{subset}, if any) are to be evaluated.}\item{f.value}{ optional numeric vector of probabilities, quantilescorresponding to which should be plotted. Can also be a function ofa single integer (representing sample size) that returns such anumeric vector. The typical value for this argument is the function\code{ppoints}, which is also the S-PLUS default. If specified, theprobabilities generated by this function is used for the plottedquantiles, using the \code{quantile} function.\code{f.value} defaults to \code{NULL}, which is equivalent tousing \code{function(n) ppoints(n, a = 1)}. This has the effect ofincluding the minimum and maximum data values in the computedquantiles. This is similar to what happens for \code{qqplot} butdifferent from the default \code{qq} behaviour in S-PLUS.For large data, this argument can be useful in plotting a smallerset of quantiles, which is usually enough to capture the pattern.}\item{panel}{ The function that uses the packet (subset of displayvariables) corresponding to a panel to create a display. Defaultpanel functions are documented separately, and often have argumentsthat can be used to customize its display in various ways. Sucharguments can usually be directly supplied to the high levelfunction. }\item{qtype}{ \code{type} argument for the \code{\link{quantile}} }\item{aspect, prepanel, scales,strip, groups, xlab, xlim, ylab, ylim, drop.unused.levels,lattice.options, default.scales, subscripts, subset}{ See\code{\link{xyplot}} }\item{\dots}{Further arguments. See corresponding entry in \code{\link{xyplot}}for non-trivial details.}}\value{An object of class \code{"trellis"}. The\code{\link[lattice:update.trellis]{update}} method can be used toupdate components of the object and the\code{\link[lattice:print.trellis]{print}} method (usually called bydefault) will plot it on an appropriate plotting device.}\author{Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}}\details{\code{qq} produces a Q-Q plot of two samples. The default behaviourof \code{qq} is different from the corresponding S-PLUS function. Seethe entry for \code{f.value} for specifics.This and all other high level Trellis functions have severalarguments in common. These are extensively documented only in thehelp page for \code{xyplot}, which should be consulted to learn moredetailed usage.}\seealso{\code{\link{xyplot}}, \code{\link{panel.qq}},\code{\link{qqmath}}, \code{\link{Lattice}}}\examples{qq(voice.part ~ height, aspect = 1, data = singer,subset = (voice.part == "Bass 2" | voice.part == "Tenor 1"))}\keyword{dplot}