This class implements a normal inverse gaussian ( \({NIG}\)) random variate generator by using a normal generator ( \(N\)) and an inverse gaussian generator ( \(IG\)), as described in the following. More...
Public Member Functions | |
| NormalInverseGaussianIGGen (InverseGaussianGen ig, NormalGen ng, double beta, double mu) | |
| Creates a normal inverse gaussian random variate generator with parameters \(\alpha\), \(\beta\) = beta, \(\mu\) = mu and \(\delta\), using generators ig and ng, as described in eq. | |
| double | nextDouble () |
| Generates a random number from the continuous distribution contained in this object. | |
| Public Member Functions inherited from umontreal.ssj.randvar.NormalInverseGaussianGen | |
| NormalInverseGaussianGen (RandomStream s, double alpha, double beta, double mu, double delta) | |
| Creates an normal inverse gaussian random variate generator with parameters \(\alpha\) = alpha, \(\beta\) = beta,. | |
| NormalInverseGaussianGen (RandomStream s, NormalInverseGaussianDist dist) | |
| Creates a new generator for the distribution dist, using stream s. | |
| double | getAlpha () |
| Returns the parameter \(\alpha\) of this object. | |
| double | getBeta () |
| Returns the parameter \(\beta\) of this object. | |
| double | getMu () |
| Returns the parameter \(\mu\) of this object. | |
| double | getDelta () |
| Returns the parameter \(\delta\) of this object. | |
| void | setParams (double alpha, double beta, double mu, double delta) |
| Sets the parameters \(\alpha\), \(\beta\), \(\mu\) and. | |
| Public Member Functions inherited from umontreal.ssj.randvar.RandomVariateGen | |
| RandomVariateGen (RandomStream s, Distribution dist) | |
| Creates a new random variate generator from the distribution dist, using stream s. | |
| void | nextArrayOfDouble (double[] v, int start, int n) |
| Generates n random numbers from the continuous distribution contained in this object. | |
| double[] | nextArrayOfDouble (int n) |
| Generates n random numbers from the continuous distribution contained in this object, and returns them in a new array of size n. | |
| RandomStream | getStream () |
| Returns the umontreal.ssj.rng.RandomStream used by this generator. | |
| void | setStream (RandomStream stream) |
| Sets the umontreal.ssj.rng.RandomStream used by this generator to stream. | |
| Distribution | getDistribution () |
| Returns the umontreal.ssj.probdist.Distribution used by this generator. | |
| String | toString () |
| Returns a String containing information about the current generator. | |
Static Public Member Functions | |
| static double | nextDouble (InverseGaussianGen ig, NormalGen ng, double beta, double mu) |
| Generates a new variate from the normal inverse gaussian distribution with parameters \(\alpha\), \(\beta\) = beta,. | |
| Static Public Member Functions inherited from umontreal.ssj.randvar.NormalInverseGaussianGen | |
| static double | nextDouble (RandomStream s, double alpha, double beta, double mu, double delta) |
| NOT IMPLEMENTED. | |
This class implements a normal inverse gaussian ( \({NIG}\)) random variate generator by using a normal generator ( \(N\)) and an inverse gaussian generator ( \(IG\)), as described in the following.
\begin{align} Y & \sim {IG}(\delta/\gamma, \delta^2) \tag{nig2} \\ X \mid(Y=y) & \sim N(\mu+ \beta y, y). \nonumber \end{align}
The normal \(N(\mu, \sigma^2)\) has mean \(\mu\) and variance \(\sigma^2\), while the inverse gaussian has the parametrization described in equation ( fInverseGaussian ). If \(\gamma= \sqrt{\alpha^2 -
\beta^2}\) with \(0 \le|\beta| < \alpha\) and \(\delta>0\), then \(X \sim{NIG}(\alpha, \beta, \mu,
\delta)\).
Definition at line 52 of file NormalInverseGaussianIGGen.java.
| umontreal.ssj.randvar.NormalInverseGaussianIGGen.NormalInverseGaussianIGGen | ( | InverseGaussianGen | ig, |
| NormalGen | ng, | ||
| double | beta, | ||
| double | mu ) |
Creates a normal inverse gaussian random variate generator with parameters \(\alpha\), \(\beta\) = beta, \(\mu\) = mu and \(\delta\), using generators ig and ng, as described in eq.
( nig2 ). The parameters \(\alpha\) and \(\delta\) are included in generator ig, while ng must be a standard normal generator.
Definition at line 64 of file NormalInverseGaussianIGGen.java.
| double umontreal.ssj.randvar.NormalInverseGaussianIGGen.nextDouble | ( | ) |
Generates a random number from the continuous distribution contained in this object.
By default, this method uses inversion by calling the umontreal.ssj.probdist.ContinuousDistribution.inverseF method of the distribution object. Alternative generating methods are provided in subclasses.
Reimplemented from umontreal.ssj.randvar.RandomVariateGen.
Definition at line 83 of file NormalInverseGaussianIGGen.java.
|
static |
Generates a new variate from the normal inverse gaussian distribution with parameters \(\alpha\), \(\beta\) = beta,.
\(\mu\) = mu and \(\delta\), using generators ig and ng, as described in eq. ( nig2 ). The parameters \(\alpha\) and \(\delta\) are included in generator ig, and ng must be a standard normal generator.
Definition at line 79 of file NormalInverseGaussianIGGen.java.