Learn R Programming

VGAM (version 0.9-1)

sinmad: Singh-Maddala Distribution Family Function

Description

Maximum likelihood estimation of the 3-parameter Singh-Maddala distribution.

Usage

sinmad(lshape1.a = "loge", lscale = "loge", lshape3.q = "loge",
       ishape1.a = NULL, iscale = NULL, ishape3.q = 1, zero = NULL)

Arguments

lshape1.a, lscale, lshape3.q
Parameter link functions applied to the (positive) parameters a, scale, and q. See Links for more choices.
ishape1.a, iscale, ishape3.q
Optional initial values for a, scale, and q.
zero
An integer-valued vector specifying which linear/additive predictors are modelled as intercepts only. Here, the values must be from the set {1,2,3} which correspond to a, scale, q, respectively.

Value

  • An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, and vgam.

Details

The 3-parameter Singh-Maddala distribution is the 4-parameter generalized beta II distribution with shape parameter $p=1$. It is known under various other names, such as the Burr XII (or just the Burr distribution), Pareto IV, beta-P, and generalized log-logistic distribution. More details can be found in Kleiber and Kotz (2003).

Some distributions which are special cases of the 3-parameter Singh-Maddala are the Lomax ($a=1$), Fisk ($q=1$), and paralogistic ($a=q$).

The Singh-Maddala distribution has density $$f(y) = aq y^{a-1} / [b^a {1 + (y/b)^a}^{1+q}]$$ for $a > 0$, $b > 0$, $q > 0$, $y \geq 0$. Here, $b$ is the scale parameter scale, and the others are shape parameters. The cumulative distribution function is $$F(y) = 1 - [1 + (y/b)^a]^{-q}.$$ The mean is $$E(Y) = b \, \Gamma(1 + 1/a) \, \Gamma(q - 1/a) / \Gamma(q)$$ provided $-a < 1 < aq$; these are returned as the fitted values.

References

Kleiber, C. and Kotz, S. (2003) Statistical Size Distributions in Economics and Actuarial Sciences, Hoboken, NJ, USA: Wiley-Interscience.

See Also

Sinmad, genbetaII, betaII, dagum, fisk, invlomax, lomax, paralogistic, invparalogistic.

Examples

Run this code
sdata <- data.frame(y = rsinmad(n = 1000, exp(1), exp(2), exp(0)))
fit <- vglm(y ~ 1, sinmad, sdata, trace = TRUE)
fit <- vglm(y ~ 1, sinmad(ishape1.a = exp(1)), sdata, trace = TRUE)
coef(fit, matrix = TRUE)
Coef(fit)
summary(fit)

# Harder problem (has the shape3.q parameter going to infinity)

set.seed(3)
sdata <- data.frame(y1 = rbeta(1000, 6, 6))
# hist(with(sdata, y1))
if (FALSE) {
# This fails
  fit1 <- vglm(y1 ~ 1, sinmad, data = sdata, trace = TRUE)
  fit1 <- vglm(y1 ~ 1, sinmad, data = sdata, trace = TRUE, maxit = 6,
               crit = "coef")
  Coef(fit1)
}
# Try this remedy:
fit2 <- vglm(y1 ~ 1, sinmad(ishape3.q = 3, lshape3.q = "loglog"),
             data = sdata, trace = TRUE, stepsize = 0.05, maxit = 99)
coef(fit2, matrix = TRUE)
Coef(fit2)

Run the code above in your browser using DataLab