The Skew Power exponential type 1-4 distribution for fitting a GAMLSS

Share:

Description

These functions define the Skew Power exponential type 1 to 4 distributions. All of them are four parameter distributions and can be used to fit a GAMLSS model. The functions dSEP1, dSEP2, dSEP3 and dSEP4 define the probability distribution functions, the functions pSEP1, pSEP2, pSEP3 and pSEP4 define the cumulative distribution functions the functions qSEP1, qSEP2, qSEP3 and qSEP4 define the inverse cumulative distribution functions and the functions rSEP1, rSEP2, rSEP3 and rSEP4 define the random generation for the Skew exponential power distributions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
SEP1(mu.link = "identity", sigma.link = "log", nu.link = "identity", 
     tau.link = "log")
dSEP1(x, mu = 0, sigma = 1, nu = 0, tau = 2, log = FALSE)
pSEP1(q, mu = 0, sigma = 1, nu = 0, tau = 2, lower.tail = TRUE, 
     log.p = FALSE)
qSEP1(p, mu = 0, sigma = 1, nu = 0, tau = 2, lower.tail = TRUE, 
     log.p = FALSE)
rSEP1(n, mu = 0, sigma = 1, nu = 0, tau = 2)

SEP2(mu.link = "identity", sigma.link = "log", nu.link = "identity", 
      tau.link = "log")
dSEP2(x, mu = 0, sigma = 1, nu = 0, tau = 2, log = FALSE)
pSEP2(q, mu = 0, sigma = 1, nu = 0, tau = 2, lower.tail = TRUE, 
      log.p = FALSE)
qSEP2(p, mu = 0, sigma = 1, nu = 0, tau = 2, lower.tail = TRUE, 
      log.p = FALSE)
rSEP2(n, mu = 0, sigma = 1, nu = 0, tau = 2)

SEP3(mu.link = "identity", sigma.link = "log", nu.link = "log", 
      tau.link = "log")
dSEP3(x, mu = 0, sigma = 1, nu = 2, tau = 2, log = FALSE)
pSEP3(q, mu = 0, sigma = 1, nu = 2, tau = 2, lower.tail = TRUE, 
      log.p = FALSE)
qSEP3(p, mu = 0, sigma = 1, nu = 2, tau = 2, lower.tail = TRUE, 
      log.p = FALSE)

SEP4(mu.link = "identity", sigma.link = "log", nu.link = "log", 
      tau.link = "log")
dSEP4(x, mu = 0, sigma = 1, nu = 2, tau = 2, log = FALSE)      
pSEP4(q, mu = 0, sigma = 1, nu = 2, tau = 2, lower.tail = TRUE, 
      log.p = FALSE)
qSEP4(p, mu = 0, sigma = 1, nu = 2, tau = 2, lower.tail = TRUE, 
      log.p = FALSE)
rSEP4(n, mu = 0, sigma = 1, nu = 2, tau = 2)

Arguments

mu.link

Defines the mu.link, with "identity" link as the default for the mu parameter. Other links are "inverse" and "log"

sigma.link

Defines the sigma.link, with "log" link as the default for the sigma parameter. Other links are "inverse" and "identity"

nu.link

Defines the nu.link, with "log" link as the default for the nu parameter. Other links are "identity" and "inverse"

tau.link

Defines the tau.link, with "log" link as the default for the tau parameter. Other links are "inverse", and "identity

x,q

vector of quantiles

mu

vector of location parameter values

sigma

vector of scale parameter values

nu

vector of skewness nu parameter values

tau

vector of kurtosis 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

Details

The probability density function of the Skew Power exponential distribution type 2, (SEP2), is defined as

f(y|mu,sigma,nu,tau)=nu/(sigma*(1+nu^2)*2^(1/tau) Gamma(1+1/tau))*(exp(-.5*abs(nu(y-mu)/sigma))^tau*I(y<mu)+exp(-.5*abs((y-mu)/sigma*nu))^tau*I(y>=mu))

for 0<y<0, mu=(-Inf,+Inf), sigma>0, nu>0) and tau>0.

Value

SEP2() returns a gamlss.family object which can be used to fit the SEP2 distribution in the gamlss() function. dSEP2() gives the density, pSEP2() gives the distribution function, qSEP2() gives the quantile function, and rSEP2() generates random deviates.

Author(s)

Bob Rigby and Mikis Stasinopoulos mikis.stasinopoulos@gamlss.org

References

Fernadez C., Osiewalski J. and Steel M.F.J.(1995) Modelling and inference with v-spherical distributions. JASA, 90, pp 1331-1340.

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.

Stasinopoulos D. M. Rigby R. A. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R. Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.org/).

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, http://www.jstatsoft.org/v23/i07.

See Also

gamlss.family, SEP

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
SEP1() 
curve(dSEP4(x, mu=5 ,sigma=1, nu=2, tau=1.5), -2, 10, 
          main = "The SEP4  density mu=5 ,sigma=1, nu=1, tau=1.5")
# library(gamlss)
#y<- rSEP4(100, mu=5, sigma=1, nu=2, tau=1.5);hist(y)
#m1<-gamlss(y~1, family=SEP1, n.cyc=50)
#m2<-gamlss(y~1, family=SEP2, n.cyc=50)
#m3<-gamlss(y~1, family=SEP3, n.cyc=50)
#m4<-gamlss(y~1, family=SEP4, n.cyc=50) 
#GAIC(m1,m2,m3,m4)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.