I have a matrix like this one:
myarray=cov(matrix(rexp(200),50,10))
I would like to generate all possible combinations of columns and compute the correlation matrix for each combination, if possible, using column numbers instead of names. In a second step I would like to compute the determinant of each matrix so maybe there is an efficient way to do it.
Here is one way:
Then do something like:
but note that
detcan only be applied to square matrices… Please clarify.