Moments | R Documentation |
These functions calculate the moments of order k
and incomplete moments of order k
of a GB2 random variable X as well as the expectation,
the variance, the kurtosis and the skewness of log(X).
moment.gb2(k, shape1, scale, shape2, shape3) incompl.gb2(x, k, shape1, scale, shape2, shape3) el.gb2(shape1, scale, shape2, shape3) vl.gb2(shape1, shape2, shape3) sl.gb2(shape2, shape3) kl.gb2(shape2, shape3)
x |
numeric; vector of quantiles. |
k |
numeric; order of the moment. |
shape1 |
numeric; positive parameter. |
scale |
numeric; positive parameter. |
shape2, shape3 |
numeric; positive parameters of the Beta distribution. |
Let X be a random variable following a GB2 distribution with parameters shape1
= a, scale
= b, shape2
= p and shape3
= q.
Moments and incomplete moments of X exist only for -ap <= k <= aq. Moments are given by
E(X^k) = b^k Gamma(p+k/a) Gamma(q-k/a) / Gamma(p) Gamma(q).
This expression, when considered a function of k
, can be viewed as the moment-generating function of Y=log(X). Thus, it is useful to compute the moments of log(X),
which are needed for deriving, for instance, the Fisher information matrix of the GB2 distribution. Moments of log(X) exist for all k
.
moment.gb2
gives the moment of order k
,
incompl.gb2
gives the incomplete moment of order k
,
El.gb2
gives the expectation of log(X),
vl.gb2
gives the variance of log(X),
sl.gb2
gives the skewness of log(X),
kl.gb2
gives the kurtosis of log(X).
Monique Graf
Kleiber, C. and Kotz, S. (2003) Statistical Size Distributions in Economics and Actuarial Sciences, chapter 6. Wiley, Ney York.
gamma
for the Gamma function and related functions (digamma
, trigamma
and psigamma
).
a <- 3.9 b <- 18873 p <- 0.97 q <- 1.03 k <- 2 x <- qgb2(0.6, a, b, p, q) moment.gb2(k, a, b, p, q) incompl.gb2(x, k, a, b, p, q) vl.gb2(a, p, q) kl.gb2(p, q)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.