80 likes | 176 Views
Stats Homework. Go to http://sqlzoo.net/ Do as much as you can in 2 hours Let me know what you did by email No need to send me lots of screen shots Just summarize your experience (good, bad, ugly). http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html. Plot Example.
E N D
Stats Homework • Go to http://sqlzoo.net/ • Do as much as you can in 2 hours • Let me know what you did by email • No need to send me lots of screen shots • Just summarize your experience (good, bad, ugly)
http://www.nytimes.com/2009/01/07/technology/business-computing/07program.htmlhttp://www.nytimes.com/2009/01/07/technology/business-computing/07program.html
Plot Example • help(ldeaths) • plot(mdeaths, col="blue", ylab="Deaths", sub="Male (blue), Female (pink)", ylim=range(c(mdeaths, fdeaths))) • lines(fdeaths, lwd=3, col="pink")
Scatter Plot • plot(as.vector(mdeaths), as.vector(fdeaths)) • g=glm(fdeaths ~ mdeaths) • abline(g) • g$coef (Intercept) mdeaths -45.2598005 0.4050554
Hist & Density • par(mfrow=c(2,1)) • hist(fdeaths/mdeaths, nclass=30) • plot(density(fdeaths/mdeaths))
Help, Demo, Example • demo(graphics) • example(plot) • example(lines) • help(cars) • help(WWWusage) • example(abline) • example(text) • example(par) • boxplots • example(boxplot) • help(chickwts) • demo(plotmath) • pairs • example(pairs) • help(quakes) • help(airquality) • help(swiss) • help(attitude) • Anorexia • utils::data(anorexia, package="MASS") • pairs(anorexia, col=c("red", "green", "blue")[anorexia$Treat]) • counting • example(table) • example(quantile) • example(hist) • help(faithful)
Randomness • example(rnorm) • example(rbinom) • example(rt) • Normality • example(qqnorm) • Regression • help(cars) • example(glm) • demo(lm.glm)