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.
Ralf Werner (2021). Normal Inverse Gaussian (NIG) distribution - updated version (https://www.mathworks.com/matlabcentral/fileexchange/10934-normal-inverse-gaussian-nig-distribution-updated-version), MATLAB Central File Exchange. Retrieved .
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.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!