qqfun(x, distribution="norm", ylab=deparse(substitute(x)),
xlab=paste(distribution, "quantiles"), main=NULL, las=par("las"),
envelope=.95, labels=FALSE, col=palette()[4], lcol=palette()[2],
xlim=NULL, ylim=NULL, lwd=1, pch=1, bg=palette()[4], cex=.4,
line=c("quartiles", "robust", "none"), ...)
norm
for the
normal distribution; t
for the t-distribution.FALSE
for no envelope.FALSE
for no labels.0
, ticks labels are drawn parallel to the
axis; set to 1
for horizontal labels (see par
).1
(a circle, see par
)..4
.1
(see par
).
Confidence envelopes are drawn at half this line width."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"
suppredf
to be passed to the appropriate quantile function.NULL
. These functions are used only for their side effect (to make a graph).q
and d
, respectively) may be used.
Studentized residuals are plotted against the appropriate t-distribution. This is adapted from qq.plot
with different values for points and lines,
more options, more transparent code and examples in the current setting. Another similar but
sophisticated function is qqmath
.
Leemis, L. M., J. T. Mcqueston (2008) Univariate distribution relationships. The American Statistician 62:45-53
qqnorm
, qqunif
, gcontrol2
p <- runif(100)
alpha <- 1/log(10)
qqfun(p,dist="unif")
qqfun(-log10(p),dist="exp",rate=alpha,pch=21)
library(car)
qq.plot(p,dist="unif")
qq.plot(-log10(p),dist="exp",rate=alpha)
library(lattice)
qqmath(~ -log10(p), distribution = function(p) qexp(p,rate=alpha))
Run the code above in your browser using DataLab