3

This is a question related to: How to simulate from a Gaussian copula?

Suppose that I have two univariate marginal distributions, say $F$ and $G$, which I can simulate from. Now, construct their joint distribution using a t copula, denoted $C(F,G;R,\nu)$. All the parameters are known.

How can I simulate from this bivariate distribution? Should I do, as a commenter said: Generate $(X,Y) \sim t_2(0,R,\nu)$ and the take $F^{-1}(t_{\nu}(X))$ and $G^{-1}(t_{\nu}(Y))$?

where $t_2(0,R,\nu)$ is a bivariate t distribution with parameters $(0,R,\nu)$, and $t_{\nu}(\cdot)$ represents the univariate t CDF with $\nu$ degrees of freedom.

Snake
  • 33
  • 4

2 Answers2

2

Look at this example in MATLAB, it has t copulas too. Basically, the steps are:

  • generate the pairs of $(x_i,y_i)$ from the copula.
  • apply the inverse CDFs to get the new pairs: $(F^{-1}(x_i),G^{-1}(y_i))$

You'll see that copula produces the pairs where $x_i,y_i\in[0,1]$, and the domains of inverse CDFs are also $[0,1]$. This works out nicely.

Aksakal
  • 55,939
  • 5
  • 90
  • 176
0

If you're using R, you can follow this example:

library(copula) 
set.seed(101)
#construct the copula object:
mytCop <- tCopula(.4, dim = 2, dispstr = 'un')
#specify the marginal distributions (here a gamma and a t-distribution):
multiV_dist <- mvdc(copula = mytCop,margins=c('gamma', 't'), 
                paramMargins = list(list(shape = 2, scale = 1), list(df = 4)))
#sample from the defined copula:
multiV_sample <- rMvdc(2000, multiV_dist)
Glen_b
  • 257,508
  • 32
  • 553
  • 939
Jordan Collins
  • 520
  • 2
  • 7
  • you got to edit the post, use markup for code – Aksakal Mar 14 '16 at 18:20
  • Jordan, What you needed to do was select the code and click the $\{\}$ button. I've fixed it now. But your answer is little use to non-R users -- please explain what the code is doing before you present the code, in such a way that someone using another language could implement it. – Glen_b Mar 14 '16 at 23:33