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.
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)
Defines the mu.link
, with "identity" link as the default for the mu parameter
Defines the sigma.link
, with "log" link as the default for the sigma parameter
Defines the nu.link
, with "log" link as the default for the nu parameter
vector of quantiles
vector of location parameter values
vector of scale parameter values
vector of kurtosis parameter
logical; if TRUE, probabilities p are given as log(p).
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]
vector of probabilities.
number of observations. If length(n) > 1
, the length is
taken to be the number required
returns a gamlss.family
object which can be used to fit a Power Exponential distribution in the gamlss()
function.
Power Exponential distribution (PE) is defined as
Thw Power Exponential distribution (PE2) is defined as
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. 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.
# NOT RUN {
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