R demo | Correlation Matrix | How to conduct, visualise and interpret

Описание к видео R demo | Correlation Matrix | How to conduct, visualise and interpret

Having several numeric variables, we often wanna know which of them are correlated and how. Correlation Matrix seems to be a good solution for it. But drawing conclusions from plain correlation coeffitients and p-values is dangerous, if we don’t visualize the data. Let’s learn a better way to produce a correlation matrix.

Here is a quick R code:

install.packages("PerformanceAnalytics")
library("PerformanceAnalytics")
chart.Correlation(iris[, 1:3])

install.packages("tidyverse")
library(tidyverse) # for "aes()"

install.packages("GGally")
library(GGally)
ggpairs(iris,
columns = 1:3,
aes(colour=Species),
lower = list(continuous = "smooth"),
upper = list(continuous = wrap("cor",
method = "pearson")))

If you only want more code (or want to support me), consider join the channel (join button below any of the videos), because I provide the code upon members requests.

Enjoy! 🥳

Комментарии

Информация по комментариям в разработке