At the moment, the Normal Inverse Gaussian (NIG) distribution is not included in the statistics toolbox. This collection of m-files supplements this toolbox with the most important functionalities for the NIG distribution: random numbers, moments, cdf, pdf and parameters by moment fit. This collection is an update of a flawed older version.
There are some problems with the inverse CDF due to numerical computation; if one finds the nigcdf(x,alpha,beta,mu,delta) =y then niginv(y,alpha,beta,mu,delta) not= x.
[alpha, beta, mu, delta]=nigpar(nigstats(alpha, beta, mu, delta)
the above command can not get the same parameters back of the NIG distribution
I have used these files rather much and they have worked flawlessly so far, there is also a clear speed improvement over the previous version for calculating the inverse of the NIG cdf, futhermore the non-uniqueness problem in the previous version is fixed.
few issues need to be sorted on this! but nice first attempt.