I want to generate a matrix of values such that the correlations (e.g., Pearsons correlations) are close to a pre-defined set of values (e.g.,
corrs = [0.5, 0.7, -0.3, 0.9, 0.2]). For simplicity, we can assume we're only concerned with the correlation of pairs of columns.
For example, I may want a matrix with 4 columns and 100 rows, and the correlations between columns should be close to the following:
CORR(c1, c2) = corrs CORR(c1, c3) = corrs CORR(c1, c4) = corrs CORR(c2, c3) = corrs CORR(c2, c4) = corrs CORR(c3, c4) = corrs
Depending on the parameters specified (matrix size, correlations), a solution may not exist, but for reasonable parameters, it seems like some algorithm should be able to come up with a solution.
Is there any areas of research that can help me accomplish this? It seems like something related to graphs and/or some iterative algorithm might be what I need, but I'm struggling with how to represent the problem mathematically or in a graph, and my knowledge of these areas is pretty limited.