Skip to content

Instantly share code, notes, and snippets.

@genki086
genki086 / correlations.R
Created March 22, 2018 04:04 — forked from anonymous/correlations.R
Code for correlations article
# Detecting correlation
# Defines three functions using base R to illustrate techniques for identifying correlations
# between continuous random variables, then tests against different types of data
# Pearsons r, distance correlation, Maximal Information Coefficient (approximated)
# A simple bootstrap function to estimate confidence intervals
bootstrap <- function(x,y,func,reps,alpha){
estimates <- c()