PE {gamlss.dist} | R Documentation |
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 |
sigma.link |
Defines the |
nu.link |
Defines the |
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 |
Details
Power Exponential distribution (PE) is defined as:
f(y|\mu,\sigma,\nu)=\frac{\nu \exp[- |z|^{\nu}]}{2 c \sigma \Gamma(\frac{1}{\nu})}
where z=(y-\mu)/ c \sigma
and c^2=\Gamma(1/\nu)\left[/\Gamma(3/\nu) \right]^{-1}
,
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 ranges above), see p. 374 of Rigby et al. (2019)
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)}
see p. 376 of Rigby et al. (2019)
Value
returns a gamlss.family
object which can be used to fit a Power Exponential distribution in the gamlss()
function.
Note
\mu
is the mean and \sigma
is the standard deviation of the Power Exponential distribution
Author(s)
Mikis Stasinopoulos, Bob Rigby
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.
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, doi:10.1201/9780429298547. 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, doi:10.18637/jss.v023.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. doi:10.1201/b21973
(see also https://www.gamlss.com/).
See Also
Examples
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")