Kumaraswamy Distribution

Description

The two-parameter Kumaraswamy family for continuous responses strictly between 0 and 1, together with a shifted logarithmic link specification.

Usage

## the Kumaraswamy family
Kumaraswamy(a.link = shiftlog, b.link = shiftlog, ...)
KS(a.link = shiftlog, b.link = shiftlog, ...)

## the log(mu - shift) link specification
shiftlog(shift = 1)

Arguments

a.link A character string, link object, or function specifying the link for shape parameter a.
b.link A character string, link object, or function specifying the link for shape parameter b.
shift A single finite number specifying the lower bound imposed by the shifted logarithmic link.
Currently not used.

Details

The Kumaraswamy distribution is continuous on \((0, 1)\) with strictly positive shape parameters \(a\) and \(b\). Its probability density function is

\(f(y; a, b) = a b y^{a - 1} (1 - y^a)^{b - 1},\)

and its cumulative distribution function is

\(F(y; a, b) = 1 - (1 - y^a)^b.\)

Consequently, the quantile function is

F^{-1}(p; a, b) = (1 - (1 - p){1/b}){1/a}.

For a parameter \(\mu\), shiftlog(shift = s) defines the link and inverse link

g() = (- s), g^{-1}() = () + s,

with domain \(\mu > s\). The default shift = 1 therefore restricts both shape parameters to be greater than 1. In that case the distribution has the unique interior mode

\(\left(\frac{a - 1}{a b - 1}\right)^{1/a}.\)

When alternative links allow \(a \leq 1\) or \(b \leq 1\), the family returns NA for the interior mode.

Value

Kumaraswamy() and KS() return the same “gamlss2.family” object. It provides probability density, cumulative distribution, quantile, and random-generation functions, as well as the mean, variance, and interior mode. Its random generator follows the family convention random(par, n).

shiftlog() returns a link specification of class “link-glm”.

References

Kumaraswamy P (1980). “A Generalized Probability Density Function for Double-Bounded Random Processes.” Journal of Hydrology, 46(1), 79–88. doi:10.1016/0022-1694(80)90036-0

See Also

gamlss2.family, gamlss2

Examples

library("gamlss2")

## create family object with different link specifications
fam <- Kumaraswamy(a.link = shiftlog, b.link = "log")

## simulate data
set.seed(1328)
n <- 1000
d <- data.frame("x" = sort(runif(n, -pi, pi)))

## true parameters
par <- data.frame(
  "a" = exp(1.2 + sin(d$x)) + 1,
  "b" = 1
)

## sample one response for every parameter row
d$y <- fam$random(par, 1)

## estimate model using the Kumaraswamy family
m <- gamlss2(y ~ s(x), data = d, family = fam)
GAMLSS-RS iteration  1: Global Deviance = -1484.0037 eps = 0.709227     
GAMLSS-RS iteration  2: Global Deviance = -1484.0052 eps = 0.000001     
## plot estimated effect
plot(m)

## plot residual diagnostics
plot(m, which = "resid")

## predict quantiles
p <- quantile(m, probs = c(0.05, 0.1, 0.5))

## plot
plot(d, pch = 19, col = adjustcolor(1, 0.3))
matlines(d$x, p, lty = 1, col = 4, lwd = 2)
axis(4, at = p[1, ], labels = names(p))