Skip to main content

Module qq

Module qq 

Source
Expand description

Quantile–quantile statistics: stat_qq, stat_qq_line (ggplot2) and stat_qq_band (qqplotr’s pointwise / KS confidence envelopes) against a choice of theoretical distribution.

Plotting positions are R’s ppoints(n) (a = 3/8 for n ≤ 10, else 1/2); sample quantiles for the reference line use R’s default type-7 interpolation. All values are validated against R (stats::qqnorm, ggplot2 4.0 stat_qq/stat_qq_line, qqplotr 0.0.7 stat_qq_band) in tests/qq_dist_r.rs.

Structs§

StatQQ
StatQQ: sort sample, compute theoretical standard-normal quantiles. Output: x (theoretical quantiles), y (sample sorted). Equivalent to StatQQDist::default().
StatQQBand
stat_qq_band (qqplotr): a confidence envelope around the QQ reference line. Output per sample point: x (theoretical quantile), ymin, ymax and y (the line’s fitted value).
StatQQDist
stat_qq against any QQDistribution: x = theoretical quantiles at ppoints(n), y = the sorted sample (also as theoretical / sample).
StatQQLine
StatQQLine: line through the sample/normal 1st and 3rd quartiles. Equivalent to StatQQLineDist::default().
StatQQLineDist
stat_qq_line against any QQDistribution: the line through the line_p (default 1st/3rd quartile) points, drawn over the range of the theoretical quantiles. Output x, y (2 rows) plus slope, intercept.

Enums§

QQBandType
Confidence-band construction for StatQQBand (qqplotr’s bandType).
QQDistribution
Theoretical distribution of a QQ plot, with its parameters (ggplot2’s distribution + dparams).

Functions§

ppoints
R’s ppoints(n).