File Exchange

image thumbnail

Normal Inverse Gaussion Distribution

version (7.66 KB) by Ralf Werner
Extends the statistics toolbox by the NIG distribution.


Updated 15 Oct 2004

No License

At the moment, the normal inverse Gaussian 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.

Comments and Ratings (5)

habibu yakubu

hi i will like join this program

Feng Chang

Anders, I got the problem you came accross. I checked the matlab files, the main reason (see the file niginv.m) is that the lower or upper bounds will increase to double whenever f_u or f_l is less then the tolerance. So when you set up the Xgrid and Ygrid, there will be big chance that the cdf (or Xgrid) will have the same value because Matlab rounds off all of the numbers to keep just four digits. The suggestion is you can add a few lines in the program to recheck the Xgrid to make sure they are different numbers.

Anders Wilhelmsson

The function niginv returns an error ( Error using ==> interp1 The values of X should be distinct) for some combinations of parameter values. For example the values 0.05 11.385 -0.25766 0.08342 3.5225 return the mentioned error. These values are very close to parameters for which the function works fine so I don't see why this is happening.

Barbara Trejo

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor