Having two numeric variables, we often wanna know whether they are correlated and how. One simple command can answer both questions by visualizing the data and conducting frequentists and bayesian correlation analysis at the same time. So, let’s learn how to do that, how to interpret all these results and how to choose the right correlation method in the first place.
Here is a quick R code:
# install.packages("ggstatsplot")
library(ggstatsplot)
ggscatterstats(
data = mtcars,
x = mpg,
y = hp,
type = "p") # or "np" or "r"
?ggscatterstats
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! ?