Tag Archives: R

How to generate bivariate pdfs given a copula and the margins in R and MATLAB

After finding a few unanswered requests for a solution of this problem in the web (including my own…) I’d like to share the final results of my work.

The problem:

Suppose you have two random variables, Z and T.

Z is N(0,1) distributed.
T is t(3) distributed.

Now you are supposed to produce four contour plots of the random variables’ joint pdf for the cases that the variables’ dependence structure is given by the

  1. Gaussian,
  2. Clayton,
  3. Frank- and
  4. Gumbel copula.

With the copula and the marginal distributions given the (bivariate) joint distribution of Z and T can be constructed. And this post is about doing exactly this in R and MatLab (and drawing the corresponding contour-plots).

Continue reading