qqPlot(x, ...)
qqp(...)
## S3 method for class 'default':
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, ...)
lm
object."norm"
for the
normal distribution; t
for the t-distribution.FALSE
for no envelope.0
, ticks labels are drawn parallel to the
axis; set to 1
for horizontal labels (see par
).1
(a circle, see par
).1
.names(x)
or observation numbers if names(x)
is NULL
.id.method="y"
will identify the id.n
points with the largest value of
abs(y-mean(y))
. See showLabels
for otheid.n=0
, the default, no
point identification.cex
(which is typically 1
).2
(see par
)."quartiles"
to pass a line through the quartile-pairs, or
"robust"
for a robust-regression line; the latter uses the rlm
function in the MASS
package. Specifying line = "none"
suppTRUE
calculate confidence envelope by parametric bootstrap;
for lm
object only. The method is due to Atkinson (1985).df
to be passed to the appropriate quantile function.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
.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)
Run the code above in your browser using DataLab