Last active
August 29, 2015 14:16
-
-
Save aaizemberg/83650d60e25da853ab2c to your computer and use it in GitHub Desktop.
el cuarteto de Anscombe
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
# 1 | |
anscombe | |
help(anscombe) | |
# Tufte, Edward R. (1989) The Visual Display of Quantitative Information, 13-14. Graphics Press. | |
# | |
# Anscombe, Francis J. (1973) Graphs in statistical analysis. American Statistician, 27, 17-21. | |
# | |
# http://en.wikipedia.org/wiki/Anscombe%27s_quartet | |
summary(anscombe) | |
# 2 | |
attach(anscombe) | |
par(mfrow=c(2,2)) | |
plot(x1, y1, xlim=c(min(x1,x2,x3,x4),max(x1,x2,x3,x4)), ylim=c(min(y1,y2,y3,y4),max(y1,y2,y3,y4))) | |
abline(lm(y1~x1)) | |
plot(x2, y2, xlim=c(min(x1,x2,x3,x4),max(x1,x2,x3,x4)), ylim=c(min(y1,y2,y3,y4),max(y1,y2,y3,y4))) | |
abline(lm(y2~x2)) | |
plot(x3, y3, xlim=c(min(x1,x2,x3,x4),max(x1,x2,x3,x4)), ylim=c(min(y1,y2,y3,y4),max(y1,y2,y3,y4))) | |
abline(lm(y3~x3)) | |
plot(x4, y4, xlim=c(min(x1,x2,x3,x4),max(x1,x2,x3,x4)), ylim=c(min(y1,y2,y3,y4),max(y1,y2,y3,y4))) | |
abline(lm(y4~x4)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment