# Multivariate Gaussian Copulas to model dependent random variables

Assume that the probability distributions of several random variables and their correlation matrix are known, say

$x_1\sim\text{lognormal}(1,1)$,

$x_2\sim \text{uniform}(1,2)$,

$x_3\sim\text{Beta}(1,1)$,

and correlation matrix

$\Sigma {\rm{ = }}\left[ \begin{array}{l} 1.0,0.4,0.8\\ 0.4,1.0,0.7\\ 0.8,0.7,1.0 \end{array} \right]$.

How to use multivariate Gaussian Copulas to model these dependent random variables?

Update:

I tried the following code based on the links provided in @F.Amer answer:

Correlation <- matrix(c(1,0.4,0.8,0.4,1,0.7,0.8,0.7,1),3,3) # correlation matrix of lognormal, weibull, and beta distributions
NormCop <- normalCopula(param, dim = 3, dispstr = "un")

MyMvd <- mvdc(NormCop, c("lnorm", "weibull","beta"),list(list(meanlog = 1, sdlog = 1), list(shape=1, scale = 1), list(shape1=1, shape2=1)))


How to set the parameter param in normalCopula` function?

• Is this a homework question? – Ruben van Bergen May 8 '18 at 7:27
• @RubenvanBergen, I just give a small example. It is a general question regarding use of Gaussian Copulas for modeling dependent random variables. – user22986 May 8 '18 at 9:26

To model a multivariate data using copula models you need to follow two steps:

1. You have to decide which model you need to use to estimate the copula parameters. For example, there are full parametric models (Maximum likelihood estimate), two-step estimation model (Inference of Margin model), and non-parametric model. The first two models may provide poor estimated in the case of unknown margins. Since, from your question, that you know the margins, so it is good to go with one of the first two methods.

2. Fit copula function and estimate its parameters.

Copula package is a nice R package that can help you to fit and estimate the model parameters.

For a very good example, please see, https://www.jstatsoft.org/article/view/v021i04/v21i04.pdf

• Thanks for your suggestion. Yes, the marginal distribution of each random variable is konwn as well as random variables' correlation matrix. It will be greatly appreciated if you can give a small examples of using Copula package for implementation. – user22986 May 8 '18 at 11:40
• Of course. Just give me a short time. – user204564 May 8 '18 at 13:27
• Please see the edit. There are a very good explanations in the providing paper. – user204564 May 8 '18 at 13:39
• Thanks for the link. I failed to find where to enter the correlation (covariance) matrix of marginal distributons. My code lines are: Correlation<-matrix(c(1,0.4,0.8,0.4,1,0.7,0.8,0.7,1),3,3) # correlation matrix of lognormal, weibull, and beta distributions NormCop <- normalCopula(param, dim = 3, dispstr = "un") MyMvd <- mvdc(NormCop, c("lnorm", "weibull","beta"),list(list(meanlog = 1, sdlog = 1), list(shape=1, scale = 1), list(shape1=1, shape2=1))) How to set the parameter "param" in normalCopula function? – user22986 May 8 '18 at 14:12
• could you please pass your code in your question? – user204564 May 9 '18 at 5:51