taiyun / corrplot

A visual exploratory tool on correlation matrix
https://github.com/taiyun/corrplot
Other
316 stars 86 forks source link

cor.mtest produces wrong p-values for Spearman with pairwise.complete.obs and missing data #271

Open jukop opened 1 year ago

jukop commented 1 year ago

Hello,

I encountered the issue in the headline. I was able to produce correct p-values using psych::corr.test. My first quess is that denominator is n which is taken from dimension of the matrix but not as number of pairs which were acceptable due to missing values.

cejourci commented 6 months ago

My problem as well. I can't find any spesification of test statistics underlying cor.mtest (pearson, spearman etc.) and missing-method (pairwise complete obs vs complete obs) so I can't trust corrplot to produce correct p-values for the correlation matrix coefficients. Will try the psych corr.test, but hope that mtest can function with more detail!