\HeaderA{qqnorm}{Quantile-Quantile Plots}{qqnorm}
\aliasA{qqline}{qqnorm}{qqline}
\methaliasA{qqnorm.default}{qqnorm}{qqnorm.default}
\aliasA{qqplot}{qqnorm}{qqplot}
\keyword{hplot}{qqnorm}
\keyword{distribution}{qqnorm}
\begin{Description}\relax
\code{qqnorm} is a generic function the default method of which
produces a normal QQ plot of the values in \code{y}.
\code{qqline} adds a line to a normal quantile-quantile plot which
passes through the first and third quartiles.

\code{qqplot} produces a QQ plot of two datasets.

Graphical parameters may be given as arguments to \code{qqnorm},
\code{qqplot} and \code{qqline}.
\end{Description}
\begin{Usage}
\begin{verbatim}
qqnorm(y, ...)
## Default S3 method:
qqnorm(y, ylim, main = "Normal Q-Q Plot",
       xlab = "Theoretical Quantiles", ylab = "Sample Quantiles",
       plot.it = TRUE, datax = FALSE, ...)

qqline(y, datax = FALSE, ...)

qqplot(x, y, plot.it = TRUE, xlab = deparse(substitute(x)),
       ylab = deparse(substitute(y)), ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] The first sample for \code{qqplot}.
\item[\code{y}] The second or only data sample.
\item[\code{xlab, ylab, main}] plot labels.  The \code{xlab} and \code{ylab}
refer to the y and x axes respectively if \code{datax = TRUE}.
\item[\code{plot.it}] logical. Should the result be plotted?
\item[\code{datax}] logical. Should data values be on the x-axis?
\item[\code{ylim, ...}] graphical parameters.
\end{ldescription}
\end{Arguments}
\begin{Value}
For \code{qqnorm} and \code{qqplot}, a list with components
\begin{ldescription}
\item[\code{x}] The x coordinates of the points that were/would be plotted
\item[\code{y}] The original \code{y} vector, i.e., the corresponding y
coordinates \emph{including \code{\LinkA{NA}{NA}}s}.
\end{ldescription}
\end{Value}
\begin{References}\relax
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
\emph{The New S Language}.
Wadsworth \& Brooks/Cole.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{ppoints}{ppoints}}, used by \code{qqnorm} to generate
approximations to expected order statistics for a normal distribution.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
y <- rt(200, df = 5)
qqnorm(y); qqline(y, col = 2)
qqplot(y, rt(300, df = 5))

qqnorm(precip, ylab = "Precipitation [in/yr] for 70 US cities")
\end{ExampleCode}
\end{Examples}

