-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Point to cov if not positive definite #746
Conversation
I can review the PR if no maintainer is available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be interesting to add some tests to test/reliability.jl
.
I would say it's already mostly covered by StatsBase.jl/test/reliability.jl Lines 40 to 43 in b0ca0b0
|
bump @nalimilan @andreasnoack. Could one of you take a quick look and merge or give feedback? This PR is a non-breaking and easily reversible change which may help users a lot. |
Co-authored-by: Milan Bouchet-Valat <[email protected]>
Thanks for fixing the typo. In abf4b88, I updated the indentation because there were 9 spaces instead of 8. |
Thanks! |
I was trying to calculate the Cronbach alpha for my dataset but got a
Covariance matrix must be positive definite.
error. Assuming that something was wrong with my data, I gave up and went to R'spsych
package only to figure out that the calculation worked there.I asked @storopoli, and it turned out that I should use
cronbachalpha(cov(Matrix(...)))
which is indeed in the documentation, but well, also easy to miss... This PR makes it harder to miss the fact that you should pass a covariance matrix.