# Sampling from skew normal copula

For a project, I wish to draw from multivariate skew normal copulas. Initially I thought my approach was correct, but now I believe it's highly unlikely that it's correct.

I've read up about the potential cause of my problem, but am still not too sure how to resolve it. Here was my initial code for the bivariate copula samples:

library(sn)
sampskew2d <- function(n, rho, a)
{       samp <- rmsn(n, xi=c(0,0), Omega=matrix(c(1,rho,rho,1),nrow=2), alpha=a)
skewcopsamples <- as.data.frame(samp)
skewcopsamples[,1] <- psn(skewcopsamples[,1] ,xi=0, omega=1, alpha=a[1])
skewcopsamples[,2] <- psn(skewcopsamples[,2] ,xi=0, omega=1, alpha=a[2])
skewcopsamples
}


As initially I thought that I could just provide a correlation coefficient $$\rho$$, skewness parameters $$\alpha_1,\alpha_2$$ and then taking applying the marginal CDFs with respective skewness parameters $$\alpha_1,\alpha_2$$. An example for $$\rho=0.7,\alpha_1=2,\alpha_2=-2$$ gives the following plot:

However, I realized since it's a copula, the marginals should be uniformly distributed in $$(0,1)$$, right? So I tried plotting the histograms of both marginals, and did not look uniform at all.

I read this might have to do with the implementation of the parametrisation, but am not sure how I should resolve this. Any help would be appreciated!

• Please include the library() calls for the package(s) you use. – Stéphane Laurent Jun 28 '19 at 12:05
• Apologies, I have added the corresponding library now. – PLY Jun 29 '19 at 0:47
• 1) You are right that your histogram proves the function does not meet the definition of a copula and correct to expect a flat histogram. 2) Why did you use a correlation parameter $\rho = 2$? Correlation coefficients are usually between -1 and +1. 3) you seem to be assuming (when you use psn) that the marginal distribution of a multivariate skew normal distribution is again skew normal; but that seems not to be the case according to this paper. – olooney Jun 29 '19 at 1:25
• @olooney 2) I accidentally wrote down $\rho=2$, but I really meant to write $\rho=0.7$. I will edit that. 3) I have indeed read that paper and a few others. However if I read correctly, according to Azzalini and Capitanio (2014, p. 130) , it states that the SN family is closed under marginalisation. – PLY Jun 30 '19 at 12:39