How do I sample random variates from a Normal Inverse Gaussian (NIG) distribution?
I need to generate 100 numbers from the NIG distribution.
I use boost::math::inverse_gaussian but it does not have an operator() member function like std::normal_distribution
Edit: Hörmann, W., Leydold have been doing some research into this topic:
- Paper Hörmann, W., Leydold, J. Generating generalized inverse Gaussian random variates. Stat Comput 24, 547–557 (2014). https://doi.org/10.1007/s11222-013-9387-3[https://doi.org/10.1007/s11222-013-9387-3][3]
- Slides UNU.RAN
- An Implementation in C Universal Non-Uniform RANdom number generators