Mixtures of Distributions—Copulas

The theory of copulas is what enables the MODEL procedure to combine and simulate multivariate distributions with different marginals. This section provides a brief overview of copulas.

Modeling a system of variables accurately is a difficult task. The underlying, ideal, distributional assumptions for each variable are usually different from each other. An individual variable might be best modeled as a t distribution or as a Poisson process. The correlation of the various variables are very important to estimate as well. A joint estimation of a set of variables would make it possible to estimate a correlation structure but would restrict the modeling to single, simple multivariate distribution (for example, the normal). Even with a simple multivariate distribution, the joint estimation would be computationally difficult and would have to deal with issues of missing data.

By using the MODEL procedure ERRORMODEL statement, you can combine and simulate from models of different distributions. The covariance matrix for the combined model is constructed by using the copula induced by the multivariate normal distribution. A copula is a function that couples joint distributions to their marginal distributions.

By default, the copula used in the MODEL procedure is based on the multivariate normal. This particular multivariate normal has zero mean and covariance matrix ${\bR }$. The user provides ${\bR }$, which can be created by using the following steps:

  1. Each model is estimated separately and their residuals are saved.

  2. The residuals for each model are converted to a normal distribution by using their CDFs, $F_ i (.)$, using the relationship $\Phi ^{-1}( F(\epsilon _{it}) )$.

  3. These normal residuals are crossed to create a covariance matrix ${\bR }$.

If the model of interest can be estimated jointly, such as multivariate T, then the OUTSN= option can be used to generate the correct covariance matrix.

A draw from this mixture of distributions is created by using the following steps that are performed automatically by the MODEL procedure.

  1. Independent $N(0,1)$ variables are generated.

  2. These variables are transformed to a correlated set by using the covariance matrix ${\bR }$.

  3. These correlated normals are transformed to a uniform by using $\Phi ()$.

  4. $F^{-1}()$ is used to compute the final sample value.

Alternate Copulas

The Gaussian, t, and the normal mixture copula are available in the MODEL procedure. These copulas support asymmetric parameters and can use alternate estimation methods for creating the base covariance matrix.

The normal (Gaussian) copula is the default. A draw from a Gaussian copula is obtained from

\[  \mb {x} = \mb {A z}  \]

where $\mb {z} \in R^ d$ is a vector of independent random normal$(0,1)$ draws, $\mb {A} \in R^{d \times d}$ is the square root of the covariance matrix, $\mb {R}$. For the normal mixture and t copula, a draw is created as

\[  \mb {x} = w {\bgamma } + \sqrt {w} \mb {A z}  \]

where $w$ is a scalar random variable and ${\bgamma } \in R^ d$ is a vector of asymmetry parameters. ${\bgamma }$ is specified in the SDATA= data set. If $W\sim $inverse gamma$( df/2, df/2)$, then $\mb {x}$ is multivariate t or skewed t if ${\bgamma }$ is provided. When NORMALMIX is specified, $w$ is distributed as a step function with each of the $n$ positive variances, $v_1$$v_ n$, having probability $p_1$$p_ n$.

The covariance matrix $\mb {R}=\mb {A}’\mb {A}$ is specified with the SDATA= option. The vector of asymmetry parameters, ${\bgamma }$, defaults to zero or is specified in the SDATA= data set with _TYPE_=ASYM. The ASYM option specifies that the nonzero asymmetry vector, ${\bgamma }$, is to be used.

In the event the covariance matrix specified with the SDATA= option is not positive semidefinite the matrix is modified to be positive semidefinite. See Rebonato and Jäckel (1999) for more details.

The actual draw for an individual variable, $y_ i$, depends on the marginal distribution of the variable, $\tilde{F}$, and the chosen copula $F$ as

\[  y_ i = \tilde{F}^{-1}_ i\left( F( x_ i ) \right)  \]

Archimedean Copulas

The three Archimedean copulas available in the MODEL procedure are the Clayton, Gumbel, and Frank copulas. Archimedean copulas require only a single parameter, $\theta $, to define the joint distribution’s covariance structure for a simulation problem, Therefore, a covariance matrix is not required to perform simulations that use Archimedean copulas, and the SDATA= option does not have to be specified for these simulations. For more information about Archimedean copulas, including the functional forms of the Clayton, Gumbel, and Frank copulas, see the section “Archimedean Copulas” in Chapter 10: The COPULA Procedure.

Asymmetrical Copula Example

In this example, an asymmetrical t copula is used to correlate two uniform distributions. The asymmetrical parameter is varied over a range of values to demonstrate its effect. The resulting graphs is produced by using ODS graphics.

data histdata;
   do asym = -1.3 to 1.1 by .3;
      date='01aug2007'd;
      y = .5;
      z = .5;
      output;
   end;
run ;
  /* Add the asymmetric parameter to cov mat */
data asym;
   do asym = -1.3 to 1.1 by .3;
      y = asym;
      z = 0;
      _name_ = "    ";
      _type_ = "asym";
      output;
      y = 1;
      z = .65;
      _name_ = "y";
      _type_ = "cov";
      output;
      y = .65;
      z = 1;
      _name_ = "z";
      _type_ = "cov";
      output;
   end;
run;
proc model out=sim(where=(_REP_ > 0)) data=histdata sdata=asym;
   y = 0;
   errormodel y ~ Uniform(0,1);

   z = 0;
   errormodel z ~ Uniform(0,1);

   solve y z / random=500 seed=12345 copula=(t(5) asym );
   by asym;
run;

To produce a panel plot of this joint distribution, use the following SAS/GRAPH statements.

ods graphics on / height=800 width=800;
proc template;
  define statgraph myplot.panel;
  BeginGraph;
    entrytitle halign=left halign=center
          textattrs=GRAPHTITLETEXT "t Copula with a Range of Asymmetry";

    layout datapanel classvars=(asym) / rows=3 columns=3
          order=rowmajor height=1024 width=1420
          rowaxisopts=(griddisplay=on label=' ')
          columnaxisopts=(griddisplay=on label=' ');
       layout prototype;
          scatterplot x=z y=y ;
       endlayout;
    endlayout;
  EndGraph;
  end;
run;

proc sgrender data=sim template='myplot.panel';
run;

Figure 19.74: t Copula with Asymmetry


Quasi-Random Number Generators

Traditionally high-discrepancy pseudo-random number generators are used to generate innovations in Monte Carlo simulations. Loosely translated, a high-discrepancy pseudo-random number generator is one in which there is very little correlation between the current number generated and the past numbers generated. This property is ideal if indeed independence of the innovations is required. If, on the other hand, the efficient spanning of a multidimensional space is desired, a low discrepancy, quasi-random number generator can be used. A quasi-random number generator produces numbers that have no random component.

A simple one-dimensional quasi-random sequence is the van der Corput sequence. Given a prime number r ( $r\ge 2$ ), any integer has a unique representation in terms of base r. A number in the interval [0,1) can be created by inverting the representation base power by base power. For example, consider r=3 and n=1, 1 in base 3 is

\[  1_{10} = 1 \cdot 3^0 = 1_3  \]

When the powers of 3 are inverted,

\[  \phi (1) = \frac{1}{3}  \]

Also, 11 in base 3 is

\[  11_{10} = 1 \cdot 3^2 + 2 \cdot 3^0 = 102_3  \]

When the powers of 3 are inverted,

\[  \phi (11) = \frac{1}{9} + 2\cdot \frac{1}{3} = \frac{7}{9}  \]

The first 10 numbers in this sequence $\phi (1) \ldots \phi (10)$ are provided below

\[  0, \frac{1}{3}, \frac{2}{3}, \frac{1}{9}, \frac{4}{9}, \frac{7}{9}, \frac{2}{9}, \frac{5}{9}, \frac{8}{9}, \frac{1}{27}  \]

As the sequence proceeds, it fills in the gaps in a uniform fashion.

Several authors have expanded this idea to many dimensions. Two versions supported by the MODEL procedure are the Sobol sequence (QUASI=SOBOL) and the Faure sequence (QUASI=FAURE). The Sobol sequence is based on binary numbers and is generally computationally faster than the Faure sequence. The Faure sequence uses the dimensionality of the problem to determine the number base to use to generate the sequence. The Faure sequence has better distributional properties than the Sobol sequence for dimensions greater than 8.

As an example of the difference between a pseudo-random number and a quasi-random number, consider simulating a bivariate normal with 100 draws.

Figure 19.75: Kernel Density of a Bivariate Normal produced by 100 Faure-Random Draws


Figure 19.76: Kernel Density of a Bivariate Normal produced by 100 Pseudo-Random Draws