I would like to do a corrplot, but instead of using the correlation coefficient, it would display the slope of a linear regression between each variables.
And if possible, it would do the same than the corrplot function, as it will show which slope is significant or not. And for comparaison issues between the variables, I guess it would be preferable to normalise all the slopes.
I want to do that because I have sometimes a bad correlation/R2, but still a significant slope. So having both the correlation matrix and the "slope" matrix would be great.
Do you know if there is any existing function like this ? Or how to do it ? Thank you.
EDIT : Here is a link explaining why I have a difference between the slope and R2/correlation : https://statisticsbyjim.com/regression/low-r-squared-regression/
Here is an example of what I get using corrplot. And what I would like to do is a similar function but with the slope instead of the correlation.
M<-cor(mtcars)
test <- cor.mtest(M, conf.level = 0.95)
corrplot(M, order="hclust", tl.col="black",
p.mat = test$p, sig.level = 0.10)