Simple question. I have many correlation matrices $\mathbb C$. I want to build a partial correlation matrices using the inverse $\mathbb C^{-1}$, e.g.:
$$\mathbf {P}_{i,j} = \frac{\mathbf {C}_{i,j}^{-1}}{\sqrt{\mathbf {C}_{i,i}^{-1} \cdot \mathbf {C}_{j,j}^{-1}}}$$$$\mathbf {P}_{i,j} = \frac{(\mathbf {C}^{-1})_{i,j}}{\sqrt{\mathbf {(\mathbf {C}^{-1})}_{i,i} \cdot \mathbf {(\mathbf {C}^{-1})}_{j,j}}}$$
The thing is in my particular situation every matrix $\mathbb C$ is not positive definite: many eigenvalues are arbitrarily smaller than 0.
I know I can make it positive definite (at least in my case) by shrinking all non-diagonal elements towards zero, e.g. $C_{i,j} := \tanh{(0.999 \cdot \tanh^{-1}(C_{i,j}))} $, but this doesn't appear correct to me nor I have seen it applied anywhere else.
What should I do?