SSJ
3.3.1
Stochastic Simulation in Java
|
This class implements noncentral chi square random variate generators using Poisson and central chi square generators. More...
Public Member Functions | |
ChiSquareNoncentralPoisGen (RandomStream stream, double nu, double lambda) | |
Creates a noncentral chi square random variate generator with \(\nu= \) nu degrees of freedom, and noncentrality parameter \(\lambda= \) lambda , using stream stream as described above. More... | |
double | nextDouble () |
Public Member Functions inherited from ChiSquareNoncentralGen | |
ChiSquareNoncentralGen (RandomStream s, double nu, double lambda) | |
Creates a noncentral chi square random variate generator with nu \(=\nu>0\) degrees of freedom and noncentrality parameter lambda \(= \lambda>0\), using stream s . | |
ChiSquareNoncentralGen (RandomStream s, ChiSquareNoncentralDist dist) | |
Create a new generator for the distribution dist and stream s . | |
double | getNu () |
Returns the value of \(\nu\) of this object. | |
double | getLambda () |
Returns the value of \(\lambda\) for this object. | |
Public Member Functions inherited from RandomVariateGen | |
RandomVariateGen (RandomStream s, Distribution dist) | |
Creates a new random variate generator from the distribution dist , using stream s . More... | |
double | nextDouble () |
Generates a random number from the continuous distribution contained in this object. More... | |
void | nextArrayOfDouble (double[] v, int start, int n) |
Generates n random numbers from the continuous distribution contained in this object. More... | |
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 . More... | |
RandomStream | getStream () |
Returns the umontreal.ssj.rng.RandomStream used by this generator. More... | |
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. More... | |
String | toString () |
Returns a String containing information about the current generator. | |
Static Public Member Functions | |
static double | nextDouble (RandomStream stream, double nu, double lambda) |
Generates a variate from the noncentral chi square distribution with parameters \(\nu= \) nu , and \(\lambda= \) lambda , using stream stream as described above. More... | |
Static Public Member Functions inherited from ChiSquareNoncentralGen | |
static double | nextDouble (RandomStream s, double nu, double lambda) |
Generates a new variate from the noncentral chi square distribution with nu = \(\nu\) degrees of freedom and noncentrality parameter lambda \(=\lambda\), using stream s . | |
Additional Inherited Members | |
Protected Member Functions inherited from ChiSquareNoncentralGen | |
void | setParams (double nu, double lambda) |
Sets the parameters \(\nu=\) nu and \(\lambda= \) lambda of this object. | |
Protected Attributes inherited from ChiSquareNoncentralGen | |
double | nu = -1.0 |
double | lambda = -1.0 |
Protected Attributes inherited from RandomVariateGen | |
RandomStream | stream |
Distribution | dist |
This class implements noncentral chi square random variate generators using Poisson and central chi square generators.
It uses the following algorithm: generate a random integer \(J \sim\mbox{Poisson}(\lambda/2)\) from a Poisson distribution, generate a random real \(X \sim\Gamma(j + \nu/2, 1/2)\) from a gamma distribution, then return \(X\). Here \(\nu\) is the number of degrees of freedom and \(\lambda\) is the noncentrality parameter.
To generate the Poisson variates, one uses tabulated inversion for \(\lambda<10\), and the acceptance complement method for \(\lambda\ge10\), as in [3] (see class umontreal.ssj.randvar.PoissonTIACGen ). To generate the gamma variates, one uses acceptance-rejection for \(\alpha<1\), and acceptance-complement for \(\alpha\ge1\), as proposed in [2], [4] (see class umontreal.ssj.randvar.GammaAcceptanceRejectionGen ).
ChiSquareNoncentralPoisGen | ( | RandomStream | stream, |
double | nu, | ||
double | lambda | ||
) |
Creates a noncentral chi square random variate generator with \(\nu= \) nu
degrees of freedom, and noncentrality parameter \(\lambda= \) lambda
, using stream stream
as described above.
Restriction: \(\lambda\le4.29\times10^9\).
|
static |
Generates a variate from the noncentral chi square distribution with parameters \(\nu= \) nu
, and \(\lambda= \) lambda
, using stream stream
as described above.
Restriction: \(\lambda\le4.29\times10^9\).