Statistics: qqplot

### Function Reference: `qqplot`

statistics: [q, s] = qqplot (x)
statistics: [q, s] = qqplot (x, y)
statistics: [q, s] = qqplot (x, dist)
statistics: [q, s] = qqplot (x, y, params)
statistics: qqplot (…)

Perform a QQ-plot (quantile plot).

If F is the CDF of the distribution dist with parameters params and G its inverse, and x a sample vector of length n, the QQ-plot graphs ordinate s(i) = i-th largest element of x versus abscissa q(if) = G((i - 0.5)/n).

If the sample comes from F, except for a transformation of location and scale, the pairs will approximately follow a straight line.

If the second argument is a vector y the empirical CDF of y is used as dist.

The default for dist is the standard normal distribution. The optional argument params contains a list of parameters of dist. For example, for a quantile plot of the uniform distribution on [2,4] and x, use

     qqplot (x, "unif", 2, 4)

dist can be any string for which a function distinv or dist_inv exists that calculates the inverse CDF of distribution dist.

If no output arguments are given, the data are plotted directly. See also: ppplot

Source Code: qqplot