I would like to simulate random variables where correlation is taken into account, but the random variables are not necessarily normally distributed. is there are way to measure correlation between two variables that are arbitrarily distributed? I have encountered the rank-correlation coefficient. Is that the best choice? Do you know of implementations that provide them?