Open CamiloMontesM opened 10 months ago
Hi Camilo
Thanks for this question and the good example. The question is a good one and ultimately depends on the nature of the data being looked at. Originally it was thought that "pairwise.complete.obs" would be a sensible default. However, the function really ought to give the user the option of changing this important parameter. I can see there would be some situations where "pairwise.complete.obs" would not be appropriate and could be potentially misleading.
I will amend the function to explicitly pass on that argument and make it clearer what the default is. This would not take long and will appear on GitHub before a new release to CRAN...
Thanks again for your message.
David
Thank you very much for your quick reply, it is very clear to me and I will wait for a new version of the function.
Best regards.
Question
Hello, I am comparing 2 correlation methods in R:
corPlot
andcor
(fromstats
package). The results of the correlation coefficients betweencorPlot
andcor
are identical when in thecor
function I useuse = "pairwise.complete.obs"
.However, when using
use = "na.or.complete"
in thecor
function, the results are completely different in some cases. In the example below, the pair C1 and E4 have no missing values and yet the correlation coefficient usinguse = "na.or.complete"
incor
function, is different from that delivered by corPlot.Why does
corPlot
use the"pairwise.complete.obs"
method, instead of other methods to take care of missing values?Thank you very much.
Camilo Montes.