This function computes a number of quantile-based summary statistics for location (median), scale (inter-quartile range and inter-quantile range), and shape (Bowley skewness and shape index) of a distribution. These statistics can be computed for unconditional and conditional distributions.
Let \(Y\) be a continuous random variable and let \(Q(p)\) be its pth quantile. The function qlss
computes the median \(Q(0.5)\), the inter-quartile range \(IQR = Q(0.75) - Q(0.25)\), the inter-quantile range \(IPR(p) = Q(1-p) - Q(p)\), the Bowley skewness index \(A(p) = (Q(1-p) + Q(p) - 2Q(0.5))/IPR(p)\), and the shape index \(T(p) = IPR(p)/IQR\), for \(0 < p < 0.25\).
The default qlss
function computes the summary statistics of a standard normal distribution or any other theoretical distribution via the argument fun
. The latter must be a function with p
as its probability argument (see for example qnorm
, qt
, qchisq
, qgamma
, etc.). When a variable x
is provided, LSS measures are computed using empirical (sample) quantiles.
The argument formula
specifies a quantile function for \(Y\) conditional on predictors \(X\). Linear models are fitted via standard quantile regression with type = "rq"
. Nonlinear models are fitted via transformation-based quantile regression with type = "rqt"
(proposal II transformation models are not available.). When conditional = TRUE
, lambda
is a vector of transformation parameters of length 3 + 2 x np
, where np = length(probs)
(3 quartiles, np
quantiles at level \(p\), np
quantiles at level \(1 - p\)).