Description Usage Arguments Details References Examples
Quantile function, and random generation for the Tukey lambda distribution.
1 2 3 |
p |
vector of probabilities. |
lambda |
shape parameter. |
lower.tail |
logical; if TRUE (default), probabilities are P[X ≤ x] otherwise, P[X > x]. |
log.p |
logical; if TRUE, probabilities p are given as log(p). |
n |
number of observations. If |
Tukey lambda distribution is a continuous probability distribution defined in terms of its quantile function. It is typically used to identify other distributions.
Quantile function:
F^-1(p) = [if λ != 0:] (p^λ - (1-p)^λ)/λ [if λ = 0:] log(p/(1-p))
Joiner, B.L., & Rosenblatt, J.R. (1971). Some properties of the range in samples from Tukey's symmetric lambda distributions. Journal of the American Statistical Association, 66(334), 394-399.
Hastings Jr, C., Mosteller, F., Tukey, J.W., & Winsor, C.P. (1947). Low moments for small samples: a comparative study of order statistics. The Annals of Mathematical Statistics, 413-426.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | pp = seq(0, 1, by = 0.001)
partmp <- par(mfrow = c(2,3))
plot(qtlambda(pp, -1), pp, type = "l", main = "lambda = -1 (Cauchy)")
plot(qtlambda(pp, 0), pp, type = "l", main = "lambda = 0 (logistic)")
plot(qtlambda(pp, 0.14), pp, type = "l", main = "lambda = 0.14 (normal)")
plot(qtlambda(pp, 0.5), pp, type = "l", main = "lambda = 0.5 (concave)")
plot(qtlambda(pp, 1), pp, type = "l", main = "lambda = 1 (uniform)")
plot(qtlambda(pp, 2), pp, type = "l", main = "lambda = 2 (uniform)")
hist(rtlambda(1e5, -1), freq = FALSE, main = "lambda = -1 (Cauchy)")
hist(rtlambda(1e5, 0), freq = FALSE, main = "lambda = 0 (logistic)")
hist(rtlambda(1e5, 0.14), freq = FALSE, main = "lambda = 0.14 (normal)")
hist(rtlambda(1e5, 0.5), freq = FALSE, main = "lambda = 0.5 (concave)")
hist(rtlambda(1e5, 1), freq = FALSE, main = "lambda = 1 (uniform)")
hist(rtlambda(1e5, 2), freq = FALSE, main = "lambda = 2 (uniform)")
par(partmp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.