ggobi / ggally

R package that extends ggplot2
http://ggobi.github.io/ggally/
587 stars 119 forks source link

JAMOVI correlation plot statistics issues #255

Closed BTunca closed 4 years ago

BTunca commented 6 years ago

Hi,

When plotting the correlation matrix with the statistics option, coefficient values appear in 2, 3, or 4 digits after the comma. I observed the same issue in different datasets. Here is the excerpt from the BigFive dataset:

capture

With Thanks,

schloerke commented 6 years ago

The current implementation of ggally_cor has 3 significant digits (not total digits). https://github.com/ggobi/ggally/blob/0dc3283acfbf84da8882575b04e3db90607183c0/R/gg-plots.R#L406-L409

For two significant digits appearing, I believe signif removes the trailing zeros.

I see on Wiki that trialing zeros are considered significant. Seems fair to add trialing zeros in. https://en.wikipedia.org/wiki/Significant_figures#Concise_rules

So fix the trailing significant zeros?

jonathon-love commented 6 years ago

hi,

i just thought i'd add another perspective.

with jamovi we generally format to significant figures – except when the value is constrained between 0 and 1 – then we use a fixed number of decimal places.

i.e. i think with correlation coefficients: 1.00, 0.50, 0.05 is preferable to 1.00, 0.500, 0.0500

cheers

jonathon