This function applies the Sinkhorn algorithm to stabilize a given correlation matrix.
sinkhorn_method(corr_matrix, epsilon = 0.001, max_iter = 100)
Arguments
- corr_matrix
A square correlation matrix to be stabilized.
- epsilon
Convergence threshold for Sinkhorn iterations (default: 1e-3).
- max_iter
Maximum number of Sinkhorn iterations (default: 100).
Value
A Sinkhorn-stabilized correlation matrix.
Examples
mycor <- abs(cor( matrix(rnorm(100),nrow=10)))
sinkhorn_corr <- sinkhorn_method(mycor)