letterValue {TukeyGH77} | R Documentation |
Letter-Value Estimation of Tukey g
-&-h
Distribution
Description
Letter-value based estimation (Hoaglin, 1985) of
Tukey g
-, h
- and g
-&-h
distribution.
All equation numbers mentioned below refer to Hoaglin (1985).
Usage
letterValue(
x,
g_ = seq.int(from = 0.15, to = 0.25, by = 0.005),
h_ = seq.int(from = 0.15, to = 0.35, by = 0.005),
halfSpread = c("both", "lower", "upper"),
...
)
Arguments
x |
|
g_ |
double vector, probabilities used for estimating |
h_ |
double vector, probabilities used for estimating |
halfSpread |
character scalar,
either to use |
... |
additional parameters, currently not in use |
Details
Unexported function letterV_g()
estimates parameter g
using equation (10) for g
-distribution
and the equivalent equation (31) for g
-&-h
distribution.
Unexported function letterV_B()
estimates parameter B
for Tukey g
-distribution
(i.e., g\neq 0
, h=0
), using equation (8a) and (8b).
Unexported function letterV_Bh_g()
estimates parameters B
and h
when g\neq 0
, using equation (33).
Unexported function letterV_Bh()
estimates parameters B
and h
for Tukey h
-distribution,
i.e., when g=0
and h\neq 0
, using equation (26a), (26b) and (27).
Function letterValue plays a similar role as fitdistrplus:::start.arg.default
,
thus extends fitdistrplus::fitdist
for estimating Tukey g
-&-h
distributions.
Value
Function letterValue returns a 'letterValue'
object,
which is double vector of estimates (\hat{A}, \hat{B}, \hat{g}, \hat{h})
for a Tukey g
-&-h
distribution.
Note
Parameter g_
and h_
does not have to be truly unique; i.e., all.equal elements are allowed.
References
Hoaglin, D.C. (1985). Summarizing Shape Numerically: The g
-and-h
Distributions.
doi:10.1002/9781118150702.ch11
Examples
set.seed(77652); x = rGH(n = 1e3L, g = -.3, h = .1)
letterValue(x, g_ = FALSE, h_ = FALSE)
letterValue(x, g_ = FALSE)
letterValue(x, h_ = FALSE)
(m3 = letterValue(x))
library(fitdistrplus)
fit = fitdist(x, distr = 'GH', start = as.list.default(m3))
plot(fit) # fitdistrplus:::plot.fitdist