SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.probdistmulti.norta.NortaInitDisc Class Referenceabstract

This abstract class defines the algorithms used for NORTA initialization when the marginal distributions are discrete. More...

Inheritance diagram for umontreal.ssj.probdistmulti.norta.NortaInitDisc:
umontreal.ssj.probdistmulti.norta.NI1 umontreal.ssj.probdistmulti.norta.NI2a umontreal.ssj.probdistmulti.norta.NI2b umontreal.ssj.probdistmulti.norta.NI3

Public Member Functions

 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.
abstract double computeCorr ()
 Computes and returns the correlation \(\rho_Z\).
void computeParams ()
 Computes the following inputs of each marginal distribution:
double integ (double r)
 Computes the function.
double deriv (double r)
 Computes the derivative of \(g_r\), given by.

Detailed Description

This abstract class defines the algorithms used for NORTA initialization when the marginal distributions are discrete.

Four algorithms are supported for now, and they are defined as subclasses of the class NortaInitDisc.

For two random variables \(X_1\) and \(X_2\), and their two marginal distributions \(F_1\) and \(F_2\), respectively, we specify the rank correlation \(r_X=\mbox{Corr}(F_1(X_1),F_2(X_2))\), the parameters of the marginal distributions and a parameter for truncation \(tr\). For the correlation matching, we must have finite supports for the two distributions. Then if the support of each marginal is infinite, we have to upper-bound it at the quantile of order \(tr\). For example, if the marginals have their support points in \([0,+\infty)\), the software will truncate to \([0,F_l^{-1}(tr)]\), for \(l=1,2\). The parameter

\(tr\) must to be given by the user, depending on the type of the two distributions. If the marginals have finite supports, one can simply give \(tr=1\).

        Each algorithm @ref NI1, @ref NI2a, @ref NI2b and @ref NI3 can be
        used to calculate the corresponding correlation

\(\rho_Z=\mbox{Corr}(Z_1,Z_2)\), where \(Z_1\) and \(Z_2\) are standard normal random variables. These subclasses implement the specific methods for NORTA initialization presented in [12] .

Each type of algorithm should be defined as a subclass of NortaInitDisc. Each subclass must implement the method computeCorr which returns the solution \(\rho_Z\). When executing this method, the subclass may call the methods integ and deriv, depending on the type of algorithm. For example, the subclass NI1 calls only the method integ, since the algorithm do not use the derivative [12] . Each subclass must also call the method computeParams(,) which is executed immediately before the beginning of the root-finder algorithm.

When creating a class representing an algorithm, the #toString method can be called to display information about the inputs.

Definition at line 74 of file NortaInitDisc.java.

Constructor & Destructor Documentation

◆ NortaInitDisc()

umontreal.ssj.probdistmulti.norta.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.

This constructor can be called only by the constructors of the subclasses.

Definition at line 112 of file NortaInitDisc.java.

Member Function Documentation

◆ computeCorr()

abstract double umontreal.ssj.probdistmulti.norta.NortaInitDisc.computeCorr ( )
abstract

Computes and returns the correlation \(\rho_Z\).

Every subclass of NortaInitDisc must implement this method.

Reimplemented in umontreal.ssj.probdistmulti.norta.NI1, umontreal.ssj.probdistmulti.norta.NI2a, umontreal.ssj.probdistmulti.norta.NI2b, and umontreal.ssj.probdistmulti.norta.NI3.

◆ computeParams()

void umontreal.ssj.probdistmulti.norta.NortaInitDisc.computeParams ( )

Computes the following inputs of each marginal distribution:

  • The number of support points \(m_1\) and \(m_2\) for the two distributions.
  • The means and standard deviations of \(F_1(X_1)\) and

    \(F_2(X_2)\), respectively.

  • The vectors \(p_1[i]\), \(p_2[j]\), \(z_1[i]=\Phi^{-1}(f_1[i])\) and \(z_2[j]=\Phi^{-1}(f_2[j])\), where \(f_1[i]\) and \(f_2[j]\), for \(i=0,…,m_1-1\); \(j=0,…,m_2-1\), are the cumulative probability functions, and \(\Phi\) is the standard normal distribution function.

Every subclass of NortaInitDisc must call this method.

Definition at line 142 of file NortaInitDisc.java.

◆ deriv()

double umontreal.ssj.probdistmulti.norta.NortaInitDisc.deriv ( double r)

Computes the derivative of \(g_r\), given by.

\begin{align} \tag{grp_M} g’_r(r)=\sum_{i=0}^{m_1-2} p_{1,i+1} \sum_{j=0}^{m_2-2} p_{2,j+1} \phi_r(z_{1,i },z_{2,j}), \end{align}

where \(\phi_r\) is the bivariate standard binormal density. The method uses \(m_1\), \(m_2\), and the vectors \(p_1[i], i=1,…,m_1-1\); \(z_1[i], i=0,…,m_1-2\); \(p_2[j], j=1,…,m_2-1\); \(z_2[j], j=0,…,m_2-2\). The correlation parameter \(r\) must be in \([-1,1]\). This method may be called by subclasses of NortaInitDisc.

Parameters
rinitial value of the correlation

Definition at line 234 of file NortaInitDisc.java.

◆ integ()

double umontreal.ssj.probdistmulti.norta.NortaInitDisc.integ ( double r)

Computes the function.

\begin{align} \tag{gr_M} g_r(r)=\sum_{i=0}^{m_1-2} p_{1,i+1} \sum_{j=0}^{m_2-2} p_{2,j+1} \bar{\Phi}_r(z_{1,i },z_{2,j}), \end{align}

which involves the bivariate normal integral \( \bar{\Phi}_r(x,y)= \int_x^{\infty}\int_y^{\infty}\phi_r(z_1,z_2) dz_1 dz_2\). Method #barF of class umontreal.ssj.probdistmulti.BiNormalDonnellyDist (from package probdistmulti of SSJ [150] ) is used to compute \(\bar{\Phi}_r(x,y)\), with \(m_1\), \(m_2\), and the vectors \(p_1[i], i=1,…,m_1-1\); \(z_1[i], i=0,…,m_1-2\); \(p_2[j], j=1,…,m_2-1\); \(z_2[j], j=0,…,m_2-2\). The correlation parameter \(r\) must be in \([-1,1]\). This method may be called by subclasses of NortaInitDisc.

Parameters
rinitial value of the correlation

Definition at line 208 of file NortaInitDisc.java.


The documentation for this class was generated from the following file: