nig function

Normal Inverse Gaussian Distribution

Normal Inverse Gaussian Distribution

Density, distribution, quantile function and random number generation for the normal inverse gaussian distribution generalized parameterized in terms of mean, standard deviation, skew and shape parameters.

dnig(x, mu = 0, sigma = 1, skew = 0, shape = 1, log = FALSE) pnig(q, mu = 0, sigma = 1, skew = 0, shape = 1, lower_tail = TRUE, log = FALSE) qnig(p, mu = 0, sigma = 1, skew = 0, shape = 1, lower_tail = TRUE, log = FALSE) rnig(n, mu = 0, sigma = 1, skew = 0, shape = 1)

Arguments

  • x, q: vector of quantiles.
  • mu: mean.
  • sigma: standard deviation.
  • skew: skew parameter.
  • shape: shape parameter.
  • log: (logical) if TRUE, probabilities p are given as log(p).
  • lower_tail: if TRUE (default), probabilities are P[Xx]P[X \le x] otherwise, P[X>x]P[X > x].
  • p: vector of probabilities.
  • n: number of observations.

Returns

d gives the density, p gives the distribution function, q gives the quantile function and r generates random deviates. Output depends on x or q length, or n for the random number generator.