Created
August 18, 2015 01:17
-
-
Save michaelmhoffman/35d47b46c7514384230f to your computer and use it in GitHub Desktop.
Is R^2 for five datapoints > 0.8?
This file contains hidden or 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
set.seed(2015-08-17) | |
sum(as.integer(lapply(seq(1000), function(i) summary(lm(y ~ x, list(y = runif(5), x = runif(5))))$r.squared > 0.8)))/1000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment