# Copula for multivariate distributions

Does anyone know how to join two multivariate distributions using copulas in r.

For example
let $X=f(x_1,x_2, \ldots,x_n)$, $Y=f(y_1,y_2,\ldots,y_n)$ I need to find a copula for joining $X$ and $Y$

Thank you,

If $C_X$ and $C_Y$ are of the same family that is closed under margins and one knows all the cross-correlations (i.e. between $X_i$ and $Y_j$ for $1 \leq i,j \leq n$) one might be lucky and can combine both copulas $C_X$ and $C_Y$ (this works for instance for the Gaussian copula family).
In the general case, one cannot combine $C_X$ and $C_Y$ in a single copula $C_{XY}$, as neither $C_X$ nor $C_Y$ will follow a uniform distribution. However, hierarchical Kendall copulas (Brechmann 2014) use the Kendall distribution function to transform the copulas to uniform margins and to combine them in a single copula. In case one wants to do it pair-wise, vine copulas that are based on the pair-copula construction (Aas 2009) are a very flexible and helpful tool.