# How to generate and correlate more than two random variables which are from different non-parametric distributions given then correlation matrix? [duplicate]

I tried to fit three variables using the non-parametric method(kernel smooth), and those distribution for each of three variables are different, so cholesky descomposition won´t work for replicate the correlation calculated by the historical data when i´m trying to make a simulation. And I need a way to simulate these variables which meets follow requirements:

1. Each simulated variable should still follow it´s fitted non parametric distribution.

2. Correlation should be replicated.

Anyone has an idea? I´ll apreciate.

Zhe