Learn R Programming

gamlss.dist (version 4.3-4)

PE: Power Exponential distribution for fitting a GAMLSS

Description

The functions define the Power Exponential distribution, a three parameter distribution, for a gamlss.family object to be used in GAMLSS fitting using the function gamlss(). The functions dPE, pPE, qPE and rPE define the density, distribution function, quantile function and random generation for the specific parameterization of the power exponential distribution showing below. The functions dPE2, pPE2, qPE2 and rPE2 define the density, distribution function, quantile function and random generation of a standard parameterization of the power exponential distribution.

Usage

PE(mu.link = "identity", sigma.link = "log", nu.link = "log")
dPE(x, mu = 0, sigma = 1, nu = 2, log = FALSE)
pPE(q, mu = 0, sigma = 1, nu = 2, lower.tail = TRUE, log.p = FALSE)
qPE(p, mu = 0, sigma = 1, nu = 2, lower.tail = TRUE, log.p = FALSE)
rPE(n, mu = 0, sigma = 1, nu = 2)
PE2(mu.link = "identity", sigma.link = "log", nu.link = "log")
dPE2(x, mu = 0, sigma = 1, nu = 2, log = FALSE)
pPE2(q, mu = 0, sigma = 1, nu = 2, lower.tail = TRUE, log.p = FALSE)
qPE2(p, mu = 0, sigma = 1, nu = 2, lower.tail = TRUE, log.p = FALSE)
rPE2(n, mu = 0, sigma = 1, nu = 2)

Arguments

mu.link
Defines the mu.link, with "identity" link as the default for the mu parameter
sigma.link
Defines the sigma.link, with "log" link as the default for the sigma parameter
nu.link
Defines the nu.link, with "log" link as the default for the nu parameter
x,q
vector of quantiles
mu
vector of location parameter values
sigma
vector of scale parameter values
nu
vector of kurtosis parameter
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

Value

  • returns a gamlss.family object which can be used to fit a Power Exponential distribution in the gamlss() function.

Details

Power Exponential distribution (PE) is defined as $$f(y|\mu,\sigma,\nu)=\frac{\nu \exp[-(\frac{1}{2})|\frac{z}{c}|^{\nu}]}{\sigma c 2^{(1+1/\nu)}\Gamma(\frac{1}{\nu})}$$ where $c=[2^{-2/\nu}\Gamma(1/\nu)/\Gamma(3/\nu) ]^{0.5}$, for $y=(-\infty,+\infty)$, $\mu=(-\infty,+\infty)$, $\sigma>0$ and $\nu>0$. This parametrization was used by Nelson (1991) and ensures $\mu$ is the mean and $\sigma$ is the standard deviation of y (for all parameter values of $\mu$, $\sigma$ and $\nu$ within the rages above) Thw Power Exponential distribution (PE2) is defined as $$f(y|\mu,\sigma,\nu)=\frac{\nu \exp[-\left|z\right|^\nu]} {2\sigma \Gamma\left(\frac{1}{\nu}\right)}$$

References

Nelson, D.B. (1991) Conditional heteroskedasticity in asset returns: a new approach. Econometrica, 57, 347-370. 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, BCPE

Examples

Run this code
PE()# gives information about the default links for the Power Exponential distribution  
# library(gamlss)
# data(abdom)
# h1<-gamlss(y~cs(x,df=3), sigma.formula=~cs(x,1), family=PE, data=abdom) # fit
# h2<-gamlss(y~cs(x,df=3), sigma.formula=~cs(x,1), family=PE2, data=abdom) # fit 
# plot(h1)
# plot(h2)
# leptokurtotic
plot(function(x) dPE(x, mu=10,sigma=2,nu=1), 0.0, 20, 
 main = "The PE  density mu=10,sigma=2,nu=1")
# platykurtotic
plot(function(x) dPE(x, mu=10,sigma=2,nu=4), 0.0, 20, 
 main = "The PE  density mu=10,sigma=2,nu=4")

Run the code above in your browser using DataLab