| qqPlot {car} | R Documentation | 
Plots empirical quantiles of a variable, or of studentized residuals from a linear model, against theoretical quantiles of a comparison distribution.
qqPlot(x, ...)
qqp(...)
## Default S3 method:
qqPlot(x, distribution="norm", ...,
	ylab=deparse(substitute(x)), xlab=paste(distribution, "quantiles"), 
	main=NULL, las=par("las"),
	envelope=.95,  
	col=palette()[1], col.lines=palette()[2], lwd=2, pch=1, cex=par("cex"), 
	line=c("quartiles", "robust", "none"),  
	labels = if(!is.null(names(x))) names(x) else seq(along=x),
	id.method = "y", 
	id.n =if(id.method[1]=="identify") Inf else 0,
	id.cex=1, id.col=palette()[1], grid=TRUE)
## S3 method for class 'lm'
qqPlot(x, xlab=paste(distribution, "Quantiles"),
	ylab=paste("Studentized Residuals(", deparse(substitute(x)), ")",
		sep=""), main=NULL,
	distribution=c("t", "norm"), line=c("robust", "quartiles", "none"),
	las=par("las"), simulate=TRUE, envelope=.95,  
	reps=100, col=palette()[1], col.lines=palette()[2], lwd=2, 
	pch=1, cex=par("cex"),
	labels, id.method = "y", 
	id.n = if(id.method[1]=="identify") Inf else 0,
	id.cex=1, id.col=palette()[1], grid=TRUE, ...)
x | 
 vector of numeric values or   | 
distribution | 
 root name of comparison distribution – e.g.,   | 
ylab | 
 label for vertical (empirical quantiles) axis.  | 
xlab | 
 label for horizontal (comparison quantiles) axis.  | 
main | 
 label for plot.  | 
envelope | 
 confidence level for point-wise confidence envelope, or 
  | 
las | 
 if   | 
col | 
 color for points; the default is the first entry
in the current color palette (see   | 
col.lines | 
 color for lines; the default is the second entry in the current color palette.  | 
pch | 
 plotting character for points; default is   | 
cex | 
 factor for expanding the size of plotted symbols; the default is
  | 
labels | 
 vector of text strings to be used to identify points, defaults to
  | 
id.method | 
 point identification method.  The default
  | 
id.n | 
 number of points labeled.  If   | 
id.cex | 
 set size of the text for point labels; the default is   | 
id.col | 
 color for the point labels.  | 
lwd | 
 line width; default is   | 
line | 
 
  | 
simulate | 
 if   | 
reps | 
 integer; number of bootstrap replications for confidence envelope.  | 
... | 
 arguments such as   | 
grid | 
 If TRUE, the default, a light-gray background grid is put on the graph  | 
Draws theoretical quantile-comparison plots for variables and for studentized residuals from a linear model. A comparison line is drawn on the plot either through the quartiles of the two distributions, or by robust regression.
Any distribution for which quantile and
density functions exist in R (with prefixes q and d, respectively) may be used. 
Studentized residuals from linear models are plotted against the appropriate t-distribution.
The function qqp is an abbreviation for qqPlot.
These functions return the labels of identified points.
John Fox jfox@mcmaster.ca
Fox, J. (2008) Applied Regression Analysis and Generalized Linear Models, Second Edition. Sage.
Fox, J. and Weisberg, S. (2011) An R Companion to Applied Regression, Second Edition, Sage.
Atkinson, A. C. (1985) Plots, Transformations, and Regression. Oxford.
qqplot, qqnorm,
qqline, showLabels
x<-rchisq(100, df=2) qqPlot(x) qqPlot(x, dist="chisq", df=2) qqPlot(lm(prestige ~ income + education + type, data=Duncan), envelope=.99)