.BG
.FN qqplot
.FN qqnorm
.TL
Quantile-Quantile Plots
.CS
qqplot(x, y, plot=TRUE)
qqnorm(x, datax=FALSE, plot=TRUE)
.AG x,y
vectors (not necessarily of the same length).  Each is taken
as a sample, for the \f2x\fP- and \f2y\fP-axis values of an empirical
probability plot.
The function `qqnorm' takes a single
vector of data for a normal probability plot.
Missing values (NAs) in `x' or `y' are omitted from the computations.
.AG datax
if `TRUE', data goes on the \f2x\fP-axis; if `FALSE'
data goes on the \f2y\fP-axis.
.AG plot
if `FALSE', `qqplot' and `qqnorm' do no plotting
but simply return
a list with components `x' and `y', giving the
coordinates of the points that would have been plotted.
.GR
These functions can also take arguments `type' and `log'
to control plot type and logarithmic axes (see `plot').
.Tl
.RT
an invisible list with components
`x' and `y' are returned, giving coordinates of the
points that would have been plotted.
For `qqnorm', one of these
components is identical to the `x' argument, hence the returned
value can be used in conjunction with unsorted labels for `x'.
.EX
zz <- qqplot(x,y,plot=F)      #save x and y coords of empirical qq
plot(zz)      #plot it
abline(rreg(zz$x,zz$y))  #fit robust line and draw it

identify(qqnorm(x),names(x))  # do normal q-q plot
   # and do interactive identification of the points

# the example plot is produced by:
my.sample <- rt(50,5)
lab <- "50 samples from a t distribution with 5 d. f."
qqnorm(my.sample,main=lab,sub="QQ Plot with Normal")
.PI
.KW hplot
.KW distribution
.KW dplot
.WR
