https://github.com/cran/lattice
Raw File
Tip revision: 5a4724ae2ed755b0e69356d0fe35a4a75481d01c authored by Deepayan Sarkar on 04 December 2004, 00:00:00 UTC
version 0.10-16
Tip revision: 5a4724a
qq.Rd
\name{qq}
\alias{qq}
\title{ Quantile-Quantile Plots of Two Samples }
\description{
  Quantile-Quantile plots for comparing two Distributions
}
\synopsis{
qq(formula, data = parent.frame(), aspect = "fill", 
    panel = panel.qq, prepanel = NULL, scales = list(), strip = TRUE, 
    groups = NULL, xlab, xlim, ylab, ylim, f.value = NULL, 
    drop.unused.levels,
    ..., default.scales,
    subscripts = !is.null(groups), subset = TRUE)
}
\usage{
qq(formula, f.value = NULL, ...)
}
\arguments{
  \item{formula}{formula of the form \code{y ~ x | g1 * g2 * \ldots},
    where \code{x} must be a numeric, and \code{y} can be a factor,
    shingle, character or numeric vector, with the restriction that there
    must be exactly two levels of \code{y}, which divide the values of
    \code{x} into two groups. Quantiles for these groups will be plotted
    along the two axes.
  }
  \item{f.value}{ optional function of a single integer (representing
    the larger of the two sample sizes), returning a vector of
    probabilities corresponding to which quantiles should be
    plotted. The typical value for this argument is \code{ppoints},
    which is also the S-PLUS default. If specified, the probabilities
    generated by this function is used for the plotted quantiles, using
    the \code{quantile} function.

    \code{f.value} defaults to \code{NULL}, which is equivalent to
    using \code{function(n) ppoints(n, a = 1)}. 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} but
    different from the default \code{qq} behaviour in S-PLUS.
  }
  \item{\dots}{Other arguments}
}
\value{
  An object of class ``trellis''. The `update' method can be used to
  update components of the object and the `print' method (usually called
  by default) will plot it on an appropriate plotting device.
}
\author{Deepayan Sarkar \email{deepayan@stat.wisc.edu}}
\details{
  \code{qq} produces a Q-Q plot of two samples.  The default behaviour
  of \code{qq} is different from the corresponding S-PLUS function. See
  the entry for \code{f.value} for specifics.

  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}, which should be consulted to learn more
  detailed 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}




back to top