Type: | Package |
Title: | Statistical Modelling for Asymmetric Exponential Power Distribution |
Date: | 2022-09-07 |
Author: | Mahdi Teimouri |
Maintainer: | Mahdi Teimouri <teimouri@aut.ac.ir> |
Description: | Developed for Computing the probability density function, cumulative distribution function, random generation, estimating the parameters of asymmetric exponential power distribution, and robust regression analysis with error term that follows asymmetric exponential power distribution. The asymmetric exponential power distribution studied here is a special case of that introduced by Dongming and Zinde-Walsh (2009) <doi:10.1016/j.jeconom.2008.09.038>. |
Encoding: | UTF-8 |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Depends: | R(≥ 3.3.0) |
Repository: | CRAN |
Version: | 0.1.4 |
NeedsCompilation: | no |
Packaged: | 2022-09-07 06:53:13 UTC; NikPardaz |
Date/Publication: | 2022-09-07 07:50:25 UTC |
Computing the probability density function (pdf) of asymmetric exponential power (AEP) distribution.
Description
The pdf of AEP distribution given by
f_{X}(x|\Theta)=
\frac{1}{2\sigma \Gamma\bigl(1+\frac{1}{\alpha}\bigr)}\exp\biggl\{-\bigg|\frac{\mu-x}{\sigma(1-\epsilon)}\bigg|^{\alpha}\biggr\},~~{}~x < \mu,
f_{X}(x|\Theta)=
\frac{1}{2\sigma \Gamma\bigl(1+\frac{1}{\alpha}\bigr)}\exp\biggl\{-\bigg|\frac{x-\mu}{\sigma(1+\epsilon)}\bigg|^{\alpha}\biggr\},~~{}~x \geq\mu,
where -\infty<x<+\infty
, \Theta=(\alpha,\sigma,\mu,\epsilon)^T
with 0<\alpha \leq 2
, \sigma> 0
, -\infty<\mu<\infty
, -1<\epsilon<1
,
and
\Gamma(u)=\int_{0}^{+\infty} x^{u-1}\exp\bigl\{-x\bigr\}dx,~u>0.
Usage
daep(x, alpha, sigma, mu, epsilon, log = FALSE)
Arguments
x |
Vector of observation of requested random realizations. |
alpha |
Tail thickness parameter. |
sigma |
Scale parameter. |
mu |
Location parameter. |
epsilon |
Skewness parameter. |
log |
If |
Details
The AEP distribution is a special case of asymmetric exponential power distribution studied by Dongming and Zinde-Walsh (2009) when p_1=p_2=\alpha
. Also, note that if \epsilon=0
, then the AEP distribution turns into a normal distribution with mean \mu
and standard deviation \sqrt{2}\sigma
. When \alpha=2
, the AEP distribution is a slight variant of epsilon-skew-normal distribution introduced by Mudholkar and Huston (2001).
Value
Computed pdf of AEP distribution at points of vector x
.
Author(s)
Mahdi Teimouri
References
Z. Dongming and V. Zinde-Walsh, 2009. Properties and estimation of asymmetric exponential power distribution, Journal of Econometrics, 148(1), 86-99.
G. S. Mudholkar and A. D. Huston, 2001. The epsilon-skew-normal distribution for analyzing near-normal data, Journal of Statistical Planning and Inference, 83, 291-309.
Examples
daep(x = 2, alpha = 1.5, sigma = 1, mu = 0, epsilon = 0.5, log = FALSE)
Estimating the parameters of AEP distribution through the expectation-maximization (EM) algorithm
Description
Estimates the parameters of AEP distribution.
Usage
fitaep(x, initial = FALSE, starts)
Arguments
x |
Vector of observations. |
initial |
By default is |
starts |
If initial values |
Value
A list of objects in two parts as
The EM estimator for the parameters of AEP distribution.
A sequence of goodness-of-fit measures consist of Akaike Information Criterion (
AIC
), Consistent Akaike Information Criterion (CAIC
), Bayesian Information Criterion (BIC
), Hannan-Quinn information criterion (HQIC
), Anderson-Darling (AD
), Cram\'eer-von Misses (CVM
), Kolmogorov-Smirnov (KS
), and log-likelihood (log-likelihood
) statistics.
Author(s)
Mahdi Teimouri
References
A. P. Dempster, N. M. Laird, and D. B. Rubin, 1977. Maximum likelihood from incomplete data via the EM algorithm, Journal of the Royal Statistical Society Series B, 39, 1-38.
Examples
x <- raep(n=50, alpha=.8, sigma=1, mu=0, epsilon=0.5)
fitaep(x, initial = FALSE, starts)
Computing the cumulative distribution function (cdf) of asymmetric exponential power (AEP) distribution.
Description
Computes the cdf of AEP distribution given by
F_{X}(x|\Theta)=
\frac{1-\epsilon}{2}-\frac{1-\epsilon}{2 \Gamma\bigl(1+\frac{1}{\alpha}\bigr)} \gamma\Bigl(\Big|\frac{\mu-x}{\sigma(1-\epsilon)}\Big|^{\alpha},\frac{1}{\alpha}\Bigr),~{}~x < \mu,
F_{X}(x|\Theta)=
\frac{1-\epsilon}{2}+\frac{1+\epsilon}{2 \Gamma\bigl(1+\frac{1}{\alpha}\bigr)} \gamma\Bigl(\Big|\frac{x-\mu}{\sigma(1+\epsilon)}\Big|^{\alpha},\frac{1}{\alpha}\Bigr),~{{}}~x \geq \mu,
where -\infty<x<+\infty
, \Theta=(\alpha,\sigma,\mu,\epsilon)^T
with 0<\alpha \leq 2
, \sigma> 0
, -\infty<\mu<\infty
, and -1<\epsilon<1
.
Usage
paep(x, alpha, sigma, mu, epsilon, log.p = FALSE, lower.tail = TRUE)
Arguments
x |
Vector of observations. |
alpha |
Tail thickness parameter. |
sigma |
Scale parameter. |
mu |
Location parameter. |
epsilon |
Skewness parameter. |
log.p |
If |
lower.tail |
If |
Value
Computed cdf of AEP distribution at points of vector x
.
Author(s)
Mahdi Teimouri
Examples
paep(x = 2, alpha = 1.5, sigma = 1, mu = 0, epsilon = 0.5, log.p = FALSE, lower.tail = TRUE)
Plasma survival data
Description
The plasma survival data contains the Survival times of plasma cell myeloma for 112 patients, see Carbone et al. (1967).
Usage
data(plasma)
Format
A text file with four columns.
References
P. P. Carbone, L. E. Kellerhouse, and E. A. Gehan. 1967. Plasmacytic myeloma: A study of the relationship of survival to various clinical manifestations and anomalous protein type in 112 patients. The American Journal of Medicine, 42 (6), 937-48.
Computing the quantile function of asymmetric exponential power (AEP) distribution.
Description
Computes the quantile function of AEP distribution given by
F_{X}^{-1}(u|\Theta)=
\mu-\sigma(1-\epsilon)\biggl[\frac{\gamma\bigl(\frac{1-\epsilon-2u}{1-\epsilon},\frac{1}{\alpha}\bigr)}{\Gamma\bigl(\frac{1}{\alpha}\bigr)}\biggr]^{\frac{1}{\alpha}},~{{}}~u\leq \frac{1-\epsilon}{2},
F_{X}^{-1}(u|\Theta)=
\mu+\sigma(1+\epsilon)\biggl[\frac{\gamma\bigl(\frac{2u+\epsilon-1}{1+\epsilon},\frac{1}{\alpha}\bigr)}{\Gamma\bigl(\frac{1}{\alpha}\bigr)}\biggr]^{\frac{1}{\alpha}},~{{}}~u> \frac{1-\epsilon}{2}.\\
where
-\infty<x<+\infty
, \Theta=(\alpha,\sigma,\mu,\epsilon)^T
with 0<\alpha \leq 2, \sigma> 0
, -\infty<\mu<\infty
, -1<\epsilon<1
,
and
\gamma(u,\nu) =\int_{0}^{u}t^{\nu-1}\exp\bigl\{-t\bigr\}dt, ~\nu>0.
Usage
qaep(u, alpha, sigma, mu, epsilon)
Arguments
u |
Numeric vector with values in |
alpha |
Tail thickness parameter. |
sigma |
Scale parameter. |
mu |
Location parameter. |
epsilon |
Skewness parameter. |
Value
A vector of length n
, consists of the random generated values from AEP distribution.
Author(s)
Mahdi Teimouri
Examples
qaep(runif(1), alpha = 1.5, sigma = 1, mu = 0, epsilon = 0.5)
Simulating realizations from the asymmetric exponential power (AEP) distribution
Description
Simulates realizations from AEP distribution.
Usage
raep(n, alpha, sigma, mu, epsilon)
Arguments
n |
Number of requested realizations. |
alpha |
Tail thickness parameter. |
sigma |
Scale parameter. |
mu |
Location parameter. |
epsilon |
Skewness parameter. |
Value
A vector of length n
, consists of the random generated values from AEP distribution.
Author(s)
Mahdi Teimouri
Examples
raep(n = 100, alpha = 1.5, sigma = 1, mu = 0, epsilon = 0.5)
Robust linear regression analysis when error term follows AEP distribution
Description
Estimates parameters of the multiple linear regression model through EM algorithm when error term follows AEP distribution. The regression model is given by
y_{i}=\beta_{0}+\beta_{1} x_{i1}+\cdots+ \beta_{k} x_{ik}+\nu_{i},~ i=1,\cdots,n,
where {\boldsymbol{\beta}}=\bigl(\beta_{0},\beta_{1},\cdots,\beta_{k}\bigr)^{T}
are the
regression coefficients and \nu_i
is the error term follows a zero-location AEP distibution.
Usage
regaep(y, x)
Arguments
y |
Vector of response observations of length |
x |
An |
Value
A list of estimated regression coefficients, summary of residuals, F statistic, R-square (R^2
), adjusted R-square, and inverted observed Fisher information matrix.
Author(s)
Mahdi Teimouri
References
A. P. Dempster, N. M. Laird, and D. B. Rubin, 1977. Maximum likelihood from incomplete data via the EM algorithm, Journal of the Royal Statistical Society Series B, 39, 1-38.
Examples
x <- seq(-5, 5, 0.1)
y <- 2 + 2*x + raep( length(x), alpha = 1, sigma = 0.5, mu = 0, epsilon = 0.5)
regaep(y, x)
Starting message when loading AEP
Description
It contains a welcome message for users of AEP.