
Quantile-quantile plots are used to compare a "theoretical" or empirical distribution to a reference distribution. They can also compare the quantiles of two reference distributions.
qqplot(x, y, npoints = 3000, idline = TRUE, plot = TRUE, ...)
distr6
object or numeric vector.
distr6
object or numeric vector.
number of evaluation points.
logical; if TRUE (default), the line
logical; if TRUE (default), figures are displayed in the plot window; otherwise a data.table
of points and calculated values is returned.
graphical parameters.
If x
or y
are given as numeric vectors then they are first passed to the Empirical
distribution.
The Empirical
distribution is a discrete distribution so quantiles are equivalent to the the Type 1 method
in quantile
.
plot.Distribution
for plotting a distr6
object.
# NOT RUN {
qqplot(Normal$new(mean = 15, sd = sqrt(30)), ChiSquared$new(df = 15))
qqplot(rt(200, df = 5), rt(300, df = 5), main = "QQ-Plot", xlab = "t-200",
ylab = "t-300")
qqplot(Normal$new(mean = 2), rnorm(100, mean = 3))
# }
Run the code above in your browser using DataLab