Learn R Programming

lawstat (version 2.4.1)

nig.parameter: Generating parameters for the normal inverse Gaussian (NIG) distribution

Description

The function produces four parameters, alpha (tail heavyness), beta (asymmetry), delta (scale), and mu (location) from the four variables, mean, variance, kurtosis, and skewness.

Usage

nig.parameter(mean=mean, variance=variance, kurtosis=kurtosis, skewness=skewness)

Arguments

mean
mean of the NIG distribution.
variance
variance of the NIG distribution.
kurtosis
excess kurtosis of the NIG distribution.
skewness
skewness of the NIG distribution.

Value

  • A list with the following numeric components.
  • alphatail-heavyness parameter of the NIG distribution.
  • betaasymmetry parameter of the NIG distribution.
  • deltascale parameter of the NIG distribution.
  • mulocation parameter of the NIG distribution.

Details

The parameters are generated on three conditions: 1. $3*kurtosis > 5*skewness^2$, 2. $skewness > 0$, and 3. $variance > 0$.

References

Atkinson, A. C. (1982). The simulation of generalized inverse Gaussian and hyperbolic random variables. SIAM Journal on Scientific and Statistical Computing 3, 502-515. Barndorff-Nielsen O., Blaesild, P. (1983). Hyperbolic distributions. In Encyclopedia of Statistical Sciences, Eds., Johnson N.L., Kotz S. and Read C.B., Vol. 3, pp. 700-707. New York: Wiley. Noguchi, K. and Gel, Y. R. (2009) Combination of Levene-type tests and a finite-intersection method for testing equality of variances against ordered alternatives. Working paper, Department of Statistics and Actuarial Science, University of Waterloo.

See Also

rnig (in fBasics package)

Examples

Run this code
library(fBasics)
test<-nig.parameter(0,2,5,1)
random<-rnig(1000000,alpha=test$alpha,beta=test$beta,mu=test$mu,delta=test$delta)
mean(random)
##   [1] 0.0003896483
var(random)
##   [1] 2.007351
kurtosis(random)
##   [1] 5.085051
##   attr(,"method")
##   [1] "excess"
skewness(random)
##   [1] 1.011352
##   attr(,"method")
##   [1] "moment"

Run the code above in your browser using DataLab