Density, distribution function, quantile function and random generation for the Singh-Maddala distribution with shape parameters a and q, and scale parameter scale.

dsinmad(x, scale = 1, shape1.a, shape3.q, log = FALSE)
psinmad(q, scale = 1, shape1.a, shape3.q, lower.tail = TRUE, log.p = FALSE)
qsinmad(p, scale = 1, shape1.a, shape3.q, lower.tail = TRUE, log.p = FALSE)
rsinmad(n, scale = 1, shape1.a, shape3.q)

Arguments

x, q

vector of quantiles.

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

shape1.a, shape3.q

shape parameters.

scale

scale parameter.

log

Logical. If log = TRUE then the logarithm of the density is returned.

lower.tail, log.p

Same meaning as in pnorm or qnorm.

Value

dsinmad gives the density, psinmad gives the distribution function, qsinmad gives the quantile function, and rsinmad generates random deviates.

References

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

Author

T. W. Yee and Kai Huang

Details

See sinmad, which is the VGAM family function for estimating the parameters by maximum likelihood estimation.

Note

The Singh-Maddala distribution is a special case of the 4-parameter generalized beta II distribution.

See also

Examples

sdata <- data.frame(y = rsinmad(n = 3000, scale = exp(2),
                                shape1 = exp(1), shape3 = exp(1)))
fit <- vglm(y ~ 1, sinmad(lss = FALSE, ishape1.a = 2.1), data = sdata,
            trace = TRUE, crit = "coef")
#> Iteration 1: coefficients = 
#> 0.88881958, 2.17683540, 1.21381205
#> Iteration 2: coefficients = 
#> 0.96155309, 1.99281771, 0.96247712
#> Iteration 3: coefficients = 
#> 0.96853041, 1.99928278, 0.96680068
#> Iteration 4: coefficients = 
#> 0.96850237, 1.99952103, 0.96733261
#> Iteration 5: coefficients = 
#> 0.96849391, 1.99954554, 0.96737736
#> Iteration 6: coefficients = 
#> 0.96849312, 1.99954791, 0.96738169
#> Iteration 7: coefficients = 
#> 0.96849305, 1.99954813, 0.96738211
#> Iteration 8: coefficients = 
#> 0.96849304, 1.99954816, 0.96738215
coef(fit, matrix = TRUE)
#>             loglink(shape1.a) loglink(scale) loglink(shape3.q)
#> (Intercept)          0.968493       1.999548         0.9673822
Coef(fit)
#> shape1.a    scale shape3.q 
#> 2.633972 7.385718 2.631048