Generalized normal distribution
Distribution function and quantile function of the generalized normal distribution.
Vector of quantiles.
Vector of probabilities.
Numeric vector containing the parameters of the distribution, in the order xi, alpha, k (location, scale, shape).
The generalized normal distribution with location parameter xi, scale parameter alpha and shape parameter k has distribution function
F(x) = Phi(y)
y = (-1/k) log(1-k(x-xi)/alpha)
and Phi(y) is the distribution function of the standard normal distribution, with x bounded by xi+alpha/k from below if k<0 and from above if k>0.
The generalized normal distribution contains as special cases the usual three-parameter lognormal distribution, corresponding to k<0, with a finite lower bound and positive skewness; the normal distribution, corresponding to k=0; and the reverse lognormal distribution, corresponding to k>0, with a finite upper bound and negative skewness. The two-parameter lognormal distribution, with a lower bound of zero and positive skewness, is obtained when k<0 and xi+alpha/k=0.
cdfgno gives the distribution function;
quagno gives the quantile function.
The functions expect the distribution parameters in a vector,
rather than as separate arguments as in the standard R
cdfln3 for the lmom package's version of the three-parameter
cdfnor for the lmom package's version of the normal distribution.
pnorm for the standard R version of the normal distribution.
plnorm for the standard R version of the two-parameter lognormal distribution.
1 2 3 4 5 6 7 8
# Random sample from the generalized normal distribution # with parameters xi=0, alpha=1, k=-0.5. quagno(runif(100), c(0,1,-0.5)) # The generalized normal distribution with parameters xi=1, alpha=1, k=-1, # is the standard lognormal distribution. An illustration: fval<-seq(0.1,0.9,by=0.1) cbind(fval, lognormal=qlnorm(fval), g.normal=quagno(fval, c(1,1,-1)))