Random Generation – How to Generate Random Numbers from Any Given Copula?

copularandom-generation

Suppose that I have a 2-dim copula function C(x_1,x_2).

How can I generate bivariate numbers from this copula?

For specific types of copulas, I can use 'rCopula' function of 'copula' package in R.
But I have no idea what to do if I have an arbitrary copula function.

Best Answer

For a copula that corresponds to a known multivariate distribution, you can simulate from that distribution and then make the margins uniform (e.g. Gaussian copula, t-copula).

More generally if you can work out the conditional (either $C(u|v)$ or $c(u|v)$), you can simulate from a uniform for $V$ and then from the conditional, perhaps via inverse-cdf (if you know $C(u|v)$) or perhaps via say accept-reject (maybe an adaptive accept-reject, some version of ziggurat, etc, if you know $c(u|v)$).

In the case of bivariate Archimedean copulas, following Nelsen (1999) or Embrechts et al., (2001), we have a mechanism for then generating from them as follows. Suppose $(U_1,U_2)$ has a two-dimensional Archimedean copula with generator $\phi$. Then:

  1. Simulate two independent $U(0,1)$ random variables, $v_1$ and $v_2$

  2. Set $t=K_C^{-1}(v_2)\,$, where $K_C(t)=t-\phi(t)/\phi'(t)$

  3. The desired simulated values are $u_1=\phi^{-1}(v_1\,\phi(t))$ and $u_2=\phi^{-1}((1-v_1)\phi(t))$.

There are other methods; for example in some cases it might sometimes be practical to do some version of bivariate accept-reject, say, or via transformation to some convenient bivariate distribution on which accept-reject might be applied.