betaII.RdMaximum likelihood estimation of the 3-parameter beta II distribution.
Parameter link functions applied to the
(positive) parameters scale, p and q.
See Links for more choices.
See CommonVGAMffArguments for information.
See CommonVGAMffArguments for information.
See CommonVGAMffArguments for information.
The 3-parameter beta II is the 4-parameter generalized beta II distribution with shape parameter \(a=1\). It is also known as the Pearson VI distribution. Other distributions which are special cases of the 3-parameter beta II include the Lomax (\(p=1\)) and inverse Lomax (\(q=1\)). More details can be found in Kleiber and Kotz (2003).
The beta II distribution has density
$$f(y) = y^{p-1} / [b^p B(p,q) \{1 + y/b\}^{p+q}]$$
for \(b > 0\), \(p > 0\), \(q > 0\), \(y \geq 0\).
Here, \(b\) is the scale parameter scale,
and the others are shape parameters.
The mean is
$$E(Y) = b \, \Gamma(p + 1) \,
\Gamma(q - 1) / (\Gamma(p) \, \Gamma(q))$$
provided \(q > 1\); these are returned as the fitted values.
This family function handles multiple responses.
An object of class "vglmff"
(see vglmff-class).
The object is used by modelling functions
such as vglm,
and vgam.
Kleiber, C. and Kotz, S. (2003). Statistical Size Distributions in Economics and Actuarial Sciences, Hoboken, NJ, USA: Wiley-Interscience.
See the notes in genbetaII.
bdata <- data.frame(y = rsinmad(2000, shape1.a = 1,
shape3.q = exp(2), scale = exp(1))) # Not genuine data!
# fit <- vglm(y ~ 1, betaII, data = bdata, trace = TRUE)
fit <- vglm(y ~ 1, betaII(ishape2.p = 0.7, ishape3.q = 0.7),
data = bdata, trace = TRUE)
#> Iteration 1: loglikelihood = -403.212452
#> Iteration 2: loglikelihood = -341.043034
#> Iteration 3: loglikelihood = -329.979204
#> Iteration 4: loglikelihood = -326.497757
#> Iteration 5: loglikelihood = -326.072765
#> Iteration 6: loglikelihood = -326.052142
#> Iteration 7: loglikelihood = -326.051897
#> Iteration 8: loglikelihood = -326.051895
#> Iteration 9: loglikelihood = -326.051895
coef(fit, matrix = TRUE)
#> loglink(scale) loglink(shape2.p) loglink(shape3.q)
#> (Intercept) 1.551698 -0.1000982 2.374101
Coef(fit)
#> scale shape2.p shape3.q
#> 4.7194769 0.9047485 10.7413555
summary(fit)
#>
#> Call:
#> vglm(formula = y ~ 1, family = betaII(ishape2.p = 0.7, ishape3.q = 0.7),
#> data = bdata, trace = TRUE)
#>
#> Coefficients:
#> Estimate Std. Error z value Pr(>|z|)
#> (Intercept):1 1.55170 0.39589 3.919 8.87e-05 ***
#> (Intercept):2 -0.10010 0.03575 -2.800 0.00511 **
#> (Intercept):3 2.37410 0.34218 6.938 3.97e-12 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Names of linear predictors: loglink(scale), loglink(shape2.p),
#> loglink(shape3.q)
#>
#> Log-likelihood: -326.0519 on 5997 degrees of freedom
#>
#> Number of Fisher scoring iterations: 9
#>
#> Warning: Hauck-Donner effect detected in the following estimate(s):
#> '(Intercept):3'
#>