Comments (1)
This looks like a problem in psych::corr.test
and not in corrplot
The different correlation methods produce different diagonals.
p.mat.all <- psych::corr.test(M.cor, adjust = "none", ci = F)
diag(p.mat.all$r) # produces 1
diag(p.mat.all$p) # produces 0
diag(p.mat.all$t) # produces Inf
> diag(p.mat.all$r)
mpg cyl disp hp drat wt qsec vs am gear carb
1 1 1 1 1 1 1 1 1 1 1
> diag(p.mat.all$p)
mpg cyl disp hp drat wt qsec vs am gear carb
0 0 0 0 0 0 0 0 0 0 0
> diag(p.mat.all$t)
mpg cyl disp hp drat wt qsec vs am gear carb
Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf
Here is a workaround:
par(mfcol = c(1, 3))
M <- cor(mtcars)
p.mat.all <- psych::corr.test(M, adjust = "none", ci = FALSE)
for (ID in c("r", "p", "t")) {
x <- p.mat.all[[ID]]
diag(x) <- 0
corrplot( M, p.mat = x, sig.level = .05, insig = "blank")
}
from corrplot.
Related Issues (20)
- Specifying Corrplot Scale Breaks HOT 2
- specifying the color range HOT 6
- the size of the symbol circle HOT 1
- corrRect does not draw full rect at the y limits HOT 1
- How to add a title to the legend color bar HOT 1
- Cex and font of p-values
- adding symbols to insignificant correlation
- Add a stroke to the text when using type "number"
- p-values are not correct HOT 1
- tests/testthat/test-corrplot.R false testing
- how to set color-legend text size and text distance?
- drop leading zero for apa format
- correlation matrix as input HOT 1
- Update for upcoming changes in package seriation
- [Feature] Add legends
- cor.mtest produces wrong p-values for Spearman with pairwise.complete.obs and missing data HOT 1
- option for sized squares in bottom-left corner of cell ?
- change default for mar= when title is not null
- number.digits argument does not display trailing zeros HOT 1
- Suggestion to allow shifting "label_sig" symbols below numbers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corrplot.