Solution for 'qgraph' error: Correlation/covariance matrix is not positive definite

Viewed 78

I am trying to do some network analysis on RStudio, namely an association network of risk factors. As part of this, I am using the 'qgraph' function to form my network graph.

However, I have gotten this error:

Warning in qgraph(data_matrix, graph = "pcor", threshold = "sig", sampleSize = 1405,  :
  Correlation/covariance matrix is not positive definite. Finding nearest positive definite matrix

I understand that the reason is likely because I have ordinal variables in my dataset, and that polychoric variables are likely to result in negative Eigenvalues.. But I would like to know whether this is a big issue/if there is any way I can resolve this warning. Thanks!

0 Answers
Related