|
SSJ
3.3.1
Stochastic Simulation in Java
|
Extends the class NortaInitDisc and implements the algorithm NI2a. More...
Public Member Functions | |
| NI2a (double rX, DiscreteDistributionInt dist1, DiscreteDistributionInt dist2, double tr, double h, double delta) | |
Constructor with the target rank correlation rX, the two discrete marginals dist1 and dist2, the paramater for the truncation tr (see the constructor of class NortaInitDisc ), and the specific parameters h and \(\delta=\) delta for the algorithm NI2a, as described above. | |
| double | computeCorr () |
| Computes and returns the correlation \(\rho_Z\) using the algorithm NI2a. More... | |
| String | toString () |
Public Member Functions inherited from NortaInitDisc | |
| NortaInitDisc (double rX, DiscreteDistributionInt dist1, DiscreteDistributionInt dist2, double tr) | |
Constructor with the target rank correlation rX, the two discrete marginals dist1 and dist2 and the parameter for the truncation tr. More... | |
| abstract double | computeCorr () |
| Computes and returns the correlation \(\rho_Z\). More... | |
| void | computeParams () |
| Computes the following inputs of each marginal distribution: More... | |
| double | integ (double r) |
| Computes the function. More... | |
| double | deriv (double r) |
| Computes the derivative of \(g_r\), given by. More... | |
| String | toString () |
Additional Inherited Members | |
Protected Attributes inherited from NortaInitDisc | |
| double | rX |
| DiscreteDistributionInt | dist1 |
| DiscreteDistributionInt | dist2 |
| double | tr |
| double | mu1 |
Package Attributes inherited from NortaInitDisc | |
| double | mu2 |
| double | sd1 |
| double | sd2 |
| int | m2 |
Extends the class NortaInitDisc and implements the algorithm NI2a.
It uses the derivative, so it calls the method deriv to compute the function \(g’_r\) given in ( grp_M ). The double integration in ( gr ) is simplified and only a simple integration is used. The algorithm uses numerical integration with Simpson’s rules over subintervals given by the finite sequence \(\rho_k=\rho_0+2kh\), for \(k=0,1,...,m\), where \(h\) is a fixed step size and \(m\) is such that \(1-2h<\rho_m<1\). The initial point is chosen as \(\rho_0=2 \sin(\pi r_X /6)\). The integration is done between \(\rho_0\) and \(\rho_m=\pm(1-\delta)\), or between \(\rho_0\) and \(0\), depending on the sign of \(r_X\) and on whether the root is to the left, or to the right of \(\rho_0\). So depending on the case, the worst-case integration distance will be set to \(d=|1-\delta-\rho_0|\) or \(d=|\rho_0|\). Then, the step size is readjusted to \(h^*=d/(2m)\), where \(d\) is the maximum number of steps (iterations) calculated based on the pre-defined step size \(h\), so \(m=\lceil d / (2h) \rceil\). The algorithm stops at iteration \(k\) if the root is in a subinterval \([\rho_{k-1},\rho_k]\), and a quadratic interpolation is used to compute the solution. For this, the method #interpol of class umontreal.ssj.util.Misc (from package util of SSJ [155] ) is used.
| double computeCorr | ( | ) |
Computes and returns the correlation \(\rho_Z\) using the algorithm NI2a.
d and m correspond to d and m given in the third paragraph of section 4 in the paper.
1.8.14