R: Box-Cox Power Exponential distribution for fitting a GAMLSS

BCPE {gamlss.dist} | R Documentation

## Box-Cox Power Exponential distribution for fitting a GAMLSS

### Description

This function defines the Box-Cox Power Exponential distribution, a four parameter distribution, for a `gamlss.family` object to be used for a GAMLSS fitting using the function `gamlss()`. The functions `dBCPE`, `pBCPE`, `qBCPE` and `rBCPE` define the density, distribution function, quantile function and random generation for the Box-Cox Power Exponential distribution. The function `checkBCPE` can be used, typically when a BCPE model is fitted, to check whether there exit a turning point of the distribution close to zero. It give the number of values of the response below their minimum turning point and also the maximum probability of the lower tail below minimum turning point. [The function `Biventer()` is the original version of the function suitable only for the untruncated BCPE distribution.] See Rigby and Stasinopoulos (2003) for details. The function `BCPEo` is identical to `BCPE` but with log link for mu.

### Usage

    BCPE(mu.link = "identity", sigma.link = "log", nu.link = "identity",
              tau.link = "log")
    BCPEo(mu.link = "log", sigma.link = "log", nu.link = "identity",
              tau.link = "log")
    BCPEuntr(mu.link = "identity", sigma.link = "log", nu.link = "identity",
              tau.link = "log")
    dBCPE(x, mu = 5, sigma = 0.1, nu = 1, tau = 2, log = FALSE)
    pBCPE(q, mu = 5, sigma = 0.1, nu = 1, tau = 2, lower.tail = TRUE, log.p = FALSE)
    qBCPE(p, mu = 5, sigma = 0.1, nu = 1, tau = 2, lower.tail = TRUE, log.p = FALSE)
    rBCPE(n, mu = 5, sigma = 0.1, nu = 1, tau = 2)
    dBCPEo(x, mu = 5, sigma = 0.1, nu = 1, tau = 2, log = FALSE)
    pBCPEo(q, mu = 5, sigma = 0.1, nu = 1, tau = 2, lower.tail = TRUE,
           log.p = FALSE)
    qBCPEo(p, mu = 5, sigma = 0.1, nu = 1, tau = 2, lower.tail = TRUE,
           log.p = FALSE)
    rBCPEo(n, mu = 5, sigma = 0.1, nu = 1, tau = 2)
    checkBCPE(obj = NULL, mu = 10, sigma = 0.1, nu = 0.5, tau = 2,...)

### Arguments

`mu.link` | Defines the `mu.link`, with "identity" link as the default for the `mu` parameter. Other links are "inverse", "log" and "own"
`sigma.link` | Defines the `sigma.link`, with "log" link as the default for the `sigma` parameter. Other links are "inverse", "identity" and "own"
`nu.link` | Defines the `nu.link`, with "identity" link as the default for the `nu` parameter. Other links are "inverse", "log" and "own"
`tau.link` | Defines the `tau.link`, with "log" link as the default for the `tau` parameter. Other links are "logshifted", "identity" and "own"
`x,q` | vector of quantiles
`mu` | vector of location parameter values
`sigma` | vector of scale parameter values
`nu` | vector of `nu` parameter values
`tau` | vector of `tau` parameter values
`log, log.p` | logical; if TRUE, probabilities p are given as log(p).
`lower.tail` | logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]
`p` | vector of probabilities.
`n` | number of observations. If `length(n) > 1`, the length is taken to be the number required
`obj` | a gamlss BCPE family object
`...` | for extra arguments

### Details

The probability density function of the untrucated Box Cox Power Exponential distribution, (`BCPE.untr`), is defined as

f(y|mu,sigma,nu,tau)=(y^(nu-1)/mu^nu)*(tau/sigma)*exp(-0.5*|z/c|^tau)/(c*2^(1+1/tau)*Gamma(1/tau))

where c=[2^(-2 /tau)*Gamma(1/tau)/Gamma(3/tau)]^0.5, where if nu!=0 then z=[(y/mu)^(nu)-1]/(nu*sigma) else z=log(y/mu)/sigma, for y>0, μ>0, σ>0, nu=(-Inf,+Inf) and τ>0.

The Box-Cox Power Exponential, `BCPE`, adjusts the above density f(y|mu,sigma,nu,tau for the truncation resulting from the condition y>0. See Rigby and Stasinopoulos (2003) for details.

### Value

`BCPE()` returns a `gamlss.family` object which can be used to fit a Box Cox Power Exponential distribution in the `gamlss()` function. `dBCPE()` gives the density, `pBCPE()` gives the distribution function, `qBCPE()` gives the quantile function, and `rBCPE()` generates random deviates.

### Warning

The `BCPE.untr` distribution may be unsuitable for some combinations of the parameters (mainly for large sigma) where the integrating constant is less than 0.99. A warning will be given if this is the case.

The `BCPE` distribution is suitable for all combinations of the parameters within their ranges [i.e. mu>0, sigma>0, nu=(-Inf,+Inf) and tau>0 ]

### Note

mu, is the median of the distribution, sigma is approximately the coefficient of variation (for small sigma and moderate `nu>0`), nu controls the skewness and tau the kurtosis of the distribution

### Author(s)

Mikis Stasinopoulos, Bob Rigby and Calliope Akantziliotou

### References

Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.

Rigby, R. A. and Stasinopoulos, D. M. (2004). Smooth centile curves for skew and kurtotic data modelled using the Box-Cox Power Exponential distribution. Statistics in Medicine, 23: 3053-3076.

Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC. An older version can be found in https://www.gamlss.com/.

Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, https://www.jstatsoft.org/v23/i07.

Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC.

### See Also

`gamlss.family`, `BCT`

### Examples

    # BCPE()   #
    # library(gamlss)
    # data(abdom)
    #h<-gamlss(y~cs(x,df=3), sigma.formula=~cs(x,1), family=BCPE, data=abdom)
    #plot(h)
    plot(function(x)dBCPE(x, mu=5,sigma=.5,nu=1, tau=3), 0.0, 15,
     main = "The BCPE  density mu=5,sigma=.5,nu=1, tau=3")
    plot(function(x) pBCPE(x, mu=5,sigma=.5,nu=1, tau=3), 0.0, 15,
     main = "The BCPE  cdf mu=5, sigma=.5, nu=1, tau=3")

[Package gamlss.dist version 5.3-2 Index]