
Last chance! 50% off unlimited learning
Sale ends in
qqPlotGestalt(distribution = "norm", param.list = list(mean = 0, sd = 1),
estimate.params = FALSE, est.arg.list = NULL, sample.size = 10, num.pages = 2,
num.plots.per.page = 4, nrow = ceiling(num.plots.per.page/2), plot.type = "Q-Q",
plot.pos.con = switch(dist.abb, norm = , lnorm = , lnormAlt = , lnorm3 = 0.375,
evd = 0.44, 0.4), equal.axes = (qq.line.type == "0-1" || estimate.params),
margin.title = NULL, add.line = FALSE, qq.line.type = "least squares",
duplicate.points.method = "standard", points.col = 1, line.col = 1,
line.lwd = par("cex"), line.lty = 1, digits = .Options$digits,
same.window = TRUE, ask = same.window & num.pages > 1,
mfrow = c(nrow, num.plots.per.page/nrow),
mar = c(4, 4, 1, 1) + 0.1, oma = c(0, 0, 7, 0), mgp = c(2, 0.5, 0), ...,
main = NULL, xlab = NULL, ylab = NULL, xlim = NULL, ylim = NULL)
distribution="norm"
. See the help file for Distribution.df
for a
list of possible distribution param.list=list(mean=0, sd=1)
. See the help file for Distribution.df
for the names and possibleestimate.params=TRUE
) or using the known
distribution parameters specified in param.list
(estimate.params=FAL
sample.size=10
.num.pages=2
.num.pages=4
.num.plots.per.page/2
."Q-Q"
(Quantile-Quantile plot, the default) and "Tukey Mean-Difference Q-Q"
(Tukey mean-difference Q-Q plot). This argument may be abbreviated (e.g.,
plot.pos.con
depends on the value of the argument
distribution
. For the normal, lognormal, three-parameter lognplot.type="Q-Q"
. The default value is TRUE
if
qq.line.type="0-1"
or estimate.params=TRUE
, otherwise it is
add.line=TRUE
and plot.type="Q-Q"
, a line determined by the
value of qq.line.type
is added to the plot.
If add.line=TRUE
and "least squares"
(the default), "0-1"
and
"robust"
. For the value
"least squares"
, a least squares "standard"
(the default), "jitter"
, and "number"
. For the value
"standard"
, a single plotting sympoints.col=1
. See the entry for col
in the
help file for par
for morepoints.col=1
. See the entry for col
in the
help file for par
for more iline.lwd=par("cex")
. See the entry for lwd
in the help file for par
for more information. line.lty=1
. See the entry for lty
in the help file for par
for more information. Thidigits=.Options$digits
.same.window=TRUE
; the default), or to create a new graphics
window for each separate plot (same.window=FALSE
).devAskNewPage
, indicating
whether to prompt the user before creating a new plot within a single graphics
window. The default value is TRUE
par
).NULL
value is returned.qqPlotGestalt
allows the user to display several Q-Q plots or
Tukey mean-difference Q-Q plots for a specified probability distribution.
The distribution is specified with the arguments distribution
and
param.list
. By default, normal (Gaussian)
Q-Q plots are produced.
If estimate.params=FALSE
(the default), the theoretical quantiles on the
$x$-axis are computed using the known distribution parameters specified in
param.list
. If estimate.params=TRUE
, the distribution parameters
are estimated based on the sample, and these estimated parameters are then used
to compute the theoretical quantiles. For distributions that can be specified
by a location and scale parameter (e.g., Normal, Logistic, extreme value, etc.),
the value of estimate.params
will not affect the general shape of the
plot, only the values recorded on the $x$-axis. For distributions that cannot
be specified by a location and scale parameter (e.g., exponential, gamma, etc.), it
is recommended that estimate.params
be set to TRUE
since in pracitice
the values of the distribution parameters are not known but must be estimated from
the sample.
The purpose of qqPlotGestalt
is to allow the user to build-up a visual
memory of qqPlot
for more information.qqPlot
.qqPlot
.# Look at eight typical normal (Gaussian) Q-Q plots for random samples
# of size 10 from a N(0,1) distribution
# Are you surprised by the variability in the plots?
#
# (Note: you must use set.seed if you want to reproduce the exact
# same plots more than once.)
set.seed(298)
qqPlotGestalt(same.window = FALSE)
# Add lines to these same Q-Q plots
#----------------------------------
set.seed(298)
qqPlotGestalt(same.window = FALSE, add.line = TRUE)
# Add lines to different Q-Q plots
#---------------------------------
qqPlotGestalt(same.window = FALSE, add.line = TRUE)
# Look at 4 sets of plots all in the same graphics window
#--------------------------------------------------------
qqPlotGestalt(add.line = TRUE, num.pages = 4)
#==========
# Look at Q-Q plots for a gamma distribution
#-------------------------------------------
qqPlotGestalt(dist = "gammaAlt",
param.list = list(mean = 10, cv = 1),
estimate.params = TRUE, num.pages = 3,
same.window = FALSE, add.line = TRUE)
# Look at Tukey Mean Difference Q-Q plots
# for a gamma distribution
#----------------------------------------
qqPlotGestalt(dist = "gammaAlt",
param.list = list(mean = 10, cv = 1),
estimate.params = TRUE, num.pages = 3,
plot.type = "Tukey", same.window = FALSE, add.line = TRUE)
#==========
# Clean up
#---------
graphics.off()
Run the code above in your browser using DataLab