-carga
library(readr)
library(kableExtra)
url_link<-"http://halweb.uc3m.es/esp/Personal/personas/agrane/libro/ficheros_datos/capitulo_7/datos_prob_7_3.txt"
mat_X<-read_table2(url_link,col_names = FALSE)
mat_X %>% head() %>%
kable(caption ="Matriz de información:" ,align = "c",digits = 6) %>%
kable_material(html_font = "sans-serif")
| X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 |
|---|---|---|---|---|---|---|---|
| 30 | 41 | 670 | 3903 | 12 | 94 | 341 | 1.2 |
| 124 | 46 | 410 | 955 | 6 | 57 | 89 | 0.5 |
| 95 | 48 | 370 | 6 | 5 | 26 | 20 | 0.1 |
| 90 | 43 | 680 | 435 | 8 | 20 | 331 | 1.6 |
| 112 | 41 | 100 | 1293 | 2 | 51 | 22 | 0.1 |
| 73 | 51 | 390 | 6115 | 4 | 35 | 93 | 0.2 |
library(corrplot)
library(grDevices)
library(Hmisc)
Mat_R<-rcorr(as.matrix(mat_X))
corrplot(Mat_R$r,
p.mat = Mat_R$r,
type = "full",
tl.col = "red",
tl.srt = 20,
pch.col = "black",
insig = "p-value",
sig.level = -1,
order = "hclust",
addrect = 1,
col = terrain.colors(20),
bg = "lightblue")
library(corrplot)
library(grDevices)
library(Hmisc)
Mat_R<-rcorr(as.matrix(mat_X))
corrplot(Mat_R$r,
p.mat = Mat_R$r,
type="lower",
tl.col="green",
tl.srt = 25,
pch.col = "black",
insig = "p-value",
sig.level = -1,
method="pie",
order = "hclust",
addrect = 4,
col= gray.colors(150) )
Mat_R<-rcorr(as.matrix(mat_X))
corrplot(Mat_R$r,
p.mat = Mat_R$r,
method="shade",
type="full",
order="hclust",
addrect=3,
tl.col="blue",
tl.srt = 20,
pch.col = "blue",
insig = "p-value",
sig.level = -1,
col = gray.colors(100))
Mat_R<-rcorr(as.matrix(mat_X))
corrplot(Mat_R$r,
p.mat = Mat_R$r,
type="full",
tl.col="black",
tl.srt = 15,
order = "hclust",
pch.col = "white",
insig = "p-value",
sig.level = -1,
method = "ellipse",
col = "black",
bg = "gold2")