Kumaraswamy Regression Family Function
kumar.RdEstimates the two parameters of the Kumaraswamy distribution by maximum likelihood estimation.
Arguments
- lshape1, lshape2
Link function for the two positive shape parameters, respectively, called \(a\) and \(b\) below. See
Linksfor more choices.
- ishape1, ishape2
Numeric. Optional initial values for the two positive shape parameters.
- tol12
Numeric and positive. Tolerance for testing whether the second shape parameter is either 1 or 2. If so then the working weights need to handle these singularities.
- gshape1
Values for a grid search for the first shape parameter. See
CommonVGAMffArgumentsfor more information.- zero
Details
The Kumaraswamy distribution has density function $$f(y;a = shape1,b = shape2) = a b y^{a-1} (1-y^{a})^{b-1}$$ where \(0 < y < 1\) and the two shape parameters, \(a\) and \(b\), are positive. The mean is \(b \times Beta(1+1/a,b)\) (returned as the fitted values) and the variance is \(b \times Beta(1+2/a,b) - (b \times Beta(1+1/a,b))^2\). Applications of the Kumaraswamy distribution include the storage volume of a water reservoir. Fisher scoring is implemented. Handles multiple responses (matrix input).
Value
An object of class "vglmff"
(see vglmff-class).
The object is used by modelling functions
such as vglm
and vgam.
References
Kumaraswamy, P. (1980). A generalized probability density function for double-bounded random processes. Journal of Hydrology, 46, 79–88.
Jones, M. C. (2009). Kumaraswamy's distribution: A beta-type distribution with some tractability advantages. Statistical Methodology, 6, 70–81.
Examples
shape1 <- exp(1); shape2 <- exp(2)
kdata <- data.frame(y = rkumar(n = 1000, shape1, shape2))
fit <- vglm(y ~ 1, kumar, data = kdata, trace = TRUE)
#> Iteration 1: loglikelihood = 457.21842
#> Iteration 2: loglikelihood = 459.90823
#> Iteration 3: loglikelihood = 459.92136
#> Iteration 4: loglikelihood = 459.92136
#> Iteration 5: loglikelihood = 459.92136
c(with(kdata, mean(y)), head(fitted(fit), 1))
#> [1] 0.4190108 0.4192859
coef(fit, matrix = TRUE)
#> loglink(shape1) loglink(shape2)
#> (Intercept) 1.007726 1.969458
Coef(fit)
#> shape1 shape2
#> 2.739364 7.166789
summary(fit)
#>
#> Call:
#> vglm(formula = y ~ 1, family = kumar, data = kdata, trace = TRUE)
#>
#> Coefficients:
#> Estimate Std. Error z value Pr(>|z|)
#> (Intercept):1 1.00773 0.02906 34.67 <2e-16 ***
#> (Intercept):2 1.96946 0.06305 31.24 <2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Names of linear predictors: loglink(shape1), loglink(shape2)
#>
#> Log-likelihood: 459.9214 on 1998 degrees of freedom
#>
#> Number of Fisher scoring iterations: 5
#>