R corrplot: combining pvalues and correlations (Brainstorm Figure)
0
0
Entering edit mode
3.4 years ago

Hi All I am a little lost at how to replicate this figure. I imagine the authors used corrplot in R to make it

plot to replicate

With corrplot I am able to make a figure that has the size of the squares and color represent the correlation. However I am lost at making the figure where the size of the squares represent the p-value and the color represent the correlation.

R corrplot • 1.4k views
ADD COMMENT
0
Entering edit mode

I think they have either misunderstood or mislabeled the figure. The size always represents the correlation coefficient - 0 is smallest and 1 is largest

They don't seem to have a lot of values between 0 and 1, just 0 and -1. Their p-value legend is just plain wrong, IMO.

It's either that or they're correlating log(p-values), which would make no sense.

ADD REPLY
0
Entering edit mode

Yes it's confusing me quite a bit too. Thanks for the confidence in my sanity. They are not correlating pvalues but showing the pvalue of the strength of the pairwise correlation, I don't see how they could have made this plot because corrplot it seems you cannot separate the size of the square from the color (i.e. use two separate data sets: pvalues and correlations).

ADD REPLY
1
Entering edit mode

You are correct - size gives absolute magnitude of correlation and color gives signed magnitude. That p-value legend seems made up; it's not from the corrplot package. Corrplot doesn't do legends, just the blue-red sidebar.

ADD REPLY
0
Entering edit mode

yeah per the legend I imagine I could fabricate my own set of Pvalues to make it. I think the easiest thing to do perhaps is to hack the corrplot function to switch the variables for coloring

ADD REPLY

Login before adding your answer.

Traffic: 2938 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6