sinmadUC: The Singh-Maddala Distribution

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

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

Usage

1
2
3
4
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.

Details

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

Value

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

Note

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

Author(s)

T. W. Yee and Kai Huang

References

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

See Also

sinmad, genbetaII.

Examples

1
2
3
4
5
6
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")
coef(fit, matrix = TRUE)
Coef(fit)

Example output

Loading required package: stats4
Loading required package: splines
VGLM    linear loop  1 :  coefficients = 
0.91103039, 2.10456733, 1.14372699
VGLM    linear loop  2 :  coefficients = 
0.97011750, 1.98191515, 0.97959993
VGLM    linear loop  3 :  coefficients = 
0.97492756, 1.98040389, 0.97192427
VGLM    linear loop  4 :  coefficients = 
0.97495815, 1.98033074, 0.97176565
VGLM    linear loop  5 :  coefficients = 
0.97496144, 1.98032034, 0.97174638
VGLM    linear loop  6 :  coefficients = 
0.97496192, 1.98031883, 0.97174358
VGLM    linear loop  7 :  coefficients = 
0.97496199, 1.98031861, 0.97174317
VGLM    linear loop  8 :  coefficients = 
0.97496200, 1.98031857, 0.97174311
            loge(shape1.a) loge(scale) loge(shape3.q)
(Intercept)       0.974962    1.980319      0.9717431
shape1.a    scale shape3.q 
2.651066 7.245051 2.642547 

VGAM documentation built on Jan. 16, 2021, 5:21 p.m.