# Correlation preserving transformation conundrum

I have a problem where I need to generate $n$ random variables $\in$ [0,1] (you can think of them as some sort of probabilities) and the variables have a known correlation structure given by a variance-covariance matrix, which is known.

The first thing I tried was generating multivariate normal random draws based on the correlation structure (which is standard textbook fare!), but it would give random variables in the range ($-\infty$,$\infty$).

So, I thought of transforming these random variables to map them to [0,1] and I tried the normal CDF for transformation (i.e. probability integral transform). Finally, I do get random variables in [0,1] but since the transformation by normal CDF is non-linear, it doesn't preserve the correlation structure.

The reason I chose to generate multivariate normal random variables in the first place was due to the fact that there is a standard well-known way of generating random variables with a given correlation structure.

It will be great if any one has thoughts on:

1). Transformation to [0,1] that will preserve correlations

2). Or, maybe an alternate take on the problem which does not involve generating multivariate normal random draws in the beginning and can generate correlated random variables on [0,1] directly

• If it's okay that the marginal distributions be uniform$(0, 1)$ then you should be able to simulate these variables directly using a copula. I haven't used it, but there's an R package copula which I believe allows you to do this (among other things). – dsaxton Jul 26 '15 at 5:13
• Yes, uniform margins are fine. Can you be a bit more clear how you would use copulas for this. – Blade Runner Jul 26 '15 at 14:24
• @dsaxton but copulas won't in general allow you to specify the Pearson correlation, which is what the question is seeking to do; in some cases you can specify a Spearman or a Kendall correlation but they usually won't correspond closely to a Pearson correlation. – Glen_b -Reinstate Monica Jul 26 '15 at 14:47
• @Glen_b: Isn't there a direct mapping between Spearman's rho and Pearson which can be used i.e. first construct the corresponding Spearman for the Pearson that you'd like; then generate the r.v.s, then shouldn't they have the original (desired) pearson? Also, my r.v.s are continuous and not ordinal, so if I were to stick to Spearman's all through, is that fine? That was the main reason I wanted to specify Pearson and not Spearman. If Spearman can be justified, I am fine with it. – Blade Runner Jul 26 '15 at 15:05
• I was kind of assuming (or hoping) that there was a way of going analytically from the copula to the correlation matrix for $(U_1, \ldots, U_n)$ but maybe that isn't the case. – dsaxton Jul 26 '15 at 15:16