Created
October 28, 2013 18:37
-
-
Save davharris/7202223 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(MASS) | |
n = 1000 | |
x = mvrnorm(n, c(0, 0), Sigma = matrix(c(1, .9, .9, 1), nrow = 2)) | |
cor(x) # correlation of about 0.9 before thresholding | |
thresholded.values = x > 0 | |
cor(thresholded.values) # Correlation drops to about 0.7, depending on random seed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment