# Generating random variables from copula function at a given joint probability?

I have one copula function, let's say a 2 dimensional Normal Copula with parameter of 0.5. I want to generate random variable pairs at given copula probability (e.g. 0.9). How can I do that? (since one copula function value correspond to more than one possible pairs). Is it possible to generate the random variables based on their occurrence probability?

$$C (u,v)= c (F^{-1}(u),F^{-1}(v)),$$ where, $C (u,v)$ is the joint distribution function of $(u,v)$, $F^{-1}(u),F^{-1}(v)$ are inverse distribution functions of the marginal distributions.$c(,)$ is the copula function.

I want to find random variable pairs $(u,v)$ when $C (u,v)$ equals to certain value, lets say $C (u,v)=0.9$

In R Copula package, random pairs can be generated through rCopula function, however, the copula probability cannot be defined.

norm.cop <- normalCopula(0.5, dim = 2)
u <- rCopula(100, norm.cop)


Thanks for the help.

• Could you explain what is the "copula occurence probability" ? By searching with Google, I only found your crosspost... stackoverflow.com/questions/29964158/… – Stéphane Laurent Apr 30 '15 at 10:13
• @ Stéphane Laurent, sorry for the cross post, I don't know where should i post this question. About the "occurrence probability" is referring to the joint probability of the two random variables. This term has application in defining return period, see: sciencedirect.com.eproxy1.lib.hku.hk/science/article/pii/… Thanks a lot. – uared1776 Apr 30 '15 at 10:20
• Assuming $C$ is available in R, you could use the contourLines function. – Stéphane Laurent May 1 '15 at 7:46
If c denotes a copula (note: normally c is used for the density of a copula) and you plug in the marginal quantile functions (note: not necessarily inverses distribution functions) then the right-hand side of your displayed equation might not be defined. Reason: A quantile function lives on the real line, whereas copulas are only defined on the unit hypercube.
What you probably wanted to use is Sklar's Theorem: H(x,y) = C(F(x), G(y)) (for F,G being the marginal distribution functions of the joint distribution function H and C being the corresponding copula if F and G are continuous). And you want to generate (X,Y) on the level set {(x,y): H(x,y)=0.9}. This problem is not uniquely defined. In other words, there are various methods to do that.
Even after reading your post multiple times, I still don't understand what exactly you try to do, but I feel that you should read more about conditional distributions and conditional copulas (as these are the approaches typically taken for what I believe is what you actually want to do); see Nelsen "An introduction to copulas" for the latter. The R package copula partly provides functionality for working with conditional copulas (see the function cCopula() for example), but you need to be more concrete with what you want to do on the theoretical side before going to the actual implementation.