The qqnorm function is generic (see Methods); method functions can be written to handle specific classes of data. Classes which already have methods for this function include:
aov, aovlist, maov.
qqnorm(x, ...) qqnorm.default(x, datax = F, plot = T) qqplot(x, y, plot = T)
Graphical parameters may also be supplied as arguments to this function (see par ). In particular these functions can take arguments type and log to control plot type and logarithmic axes (see plot.default). Use the arguments xlim and ylim to control the limits of the plot region. In addition, the high-level graphics arguments described under plot.default and the arguments to title may be supplied to this function.
In qqplot each vector is taken as a sample, for the x- and y-axis values of an empirical probability plot.
The function qqnorm takes a single vector of data for a normal (Gaussian) probability plot.
QQplots are used to assess whether data have a particular distribution, or whether two datasets have the same distribution. If the distributions are the same, then the plot will be approximately a straight line. The extreme points have more variability than points toward the center. A plot with a "U" shape means that one distribution is skewed relative to the other. An "S" shape implies that one distribution has longer tails than the other. In the default configuration a plot from qqnorm that is bent down on the left and bent up on the right means that the data have longer tails than the Gaussian.
Chambers, J. M., Cleveland, W. S., Kleiner, B. and Tukey, P. A. (1983). Graphical Methods for Data Analysis. Wadsworth, Belmont, California.
Hoaglin, D. C., Mosteller, F. and Tukey, J. W., editors (1983). Understanding Robust and Exploratory Data Analysis. Wiley, New York.
zz <- qqplot(lottery.payoff, lottery3.payoff, plot = F) plot(zz) # plot it abline(lmsreg(zz$x, zz$y)) # fit robust line and draw it qqnorm(rnorm(samplesize)) # samplesize must be previously specified # evaluate several times to train your eye set.seed(493) my.sample <- rt(100, 5) lab <- "100 samples from a t-distribution with 5 df" qqnorm(my.sample, main = lab, sub = "QQ Plot with Line") qqline(my.sample)