Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Paolo Toccaceli, 2017-11-28 | |
import numpy as np | |
import scipy.stats as ss | |
def Iman_Conover(X_orig,S): | |
"""Given a matrix X_orig with n samples of random variables from r distributions and a correlation matrix S, | |
this function outputs a matrix of n samples of r random variables with the same marginal distributions | |
as the input, but with correlation as close as possible to S | |