I have a data set which contains cell counts across the 250 brain regions in 12 animals. I want to construct a correlation matrix and a graph theoretical model using the grouped lasso correction. However it says my matrix is not positive definite.

I have tried to use the caret package to select correlations above .xx in order to have a positive definite matrix. However, the highest correlation allowed between variables without throwing the error is .5. This reduces the number of columns from 250 to 8, which I can't use. Can anyone help with suggestions on how to move forward? Could this be do to the fact that I have many more variables than observations?

  • $\begingroup$ This might help! $\endgroup$ – kedarps Jun 5 '19 at 15:11
  • $\begingroup$ I've seen this thread before. My worry is if I do it one by one, it won't be different from using the caret package, ie: I'll only have 10 variables left. Any other ideas? $\endgroup$ – Antonio.Aubry Jun 5 '19 at 15:16
  • $\begingroup$ The thread at stats.stackexchange.com/questions/16327/… provides some solutions. It's unclear, though, what "it" is and why it is objecting to a non-pd matrix. The solution might just be to use different software, but you would need to provide more information before we could know. $\endgroup$ – whuber Jun 5 '19 at 15:20
  • $\begingroup$ Sorry, I'm using the qgraph package to construct the graphical analysis. The function "cor_auto" which is essentially a wrapper around the LavCor function. I could simply chose not to force a PD, but this is not suggested for the EBICglasso model I want to use. Perhaps its time to chose a different model? $\endgroup$ – Antonio.Aubry Jun 5 '19 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.