data exploration and graphics with r
DESCRIPTION
Quantitative Data Analysis - Part II: Data exploration and graphics - Master in Global Environmental Change - IE UniversityTRANSCRIPT
![Page 1: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/1.jpg)
Quantitative Data Analysis
Data exploration and graphics
![Page 3: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/3.jpg)
Russian most extreme summer
http://joewheatley.net/russian-grain/
![Page 5: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/5.jpg)
![Page 6: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/6.jpg)
acpclust.R
![Page 7: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/7.jpg)
More linkshttp://www.statmethods.net/http://addictedtor.free.fr/graphiques/http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/
![Page 8: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/8.jpg)
Plots and charts
![Page 9: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/9.jpg)
Low level functions
![Page 10: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/10.jpg)
graphical parameters: par()
![Page 11: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/11.jpg)
Lattice package
![Page 12: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/12.jpg)
Curves and functionsx<-seq(-2,2,0.01)y<-x^3-3*xplot(x,y,type="l")
Orcurve(x^3-3*x, -2, 2)
![Page 13: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/13.jpg)
Histogram
![Page 14: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/14.jpg)
histogram
histogram(~Countries$Population|Countries$Region)
![Page 15: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/15.jpg)
histogram
![Page 16: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/16.jpg)
histogramhistogram(~Population|Region,data=Countries, col=2:6,panel=function(x,...,col) { panel.histogram(x,...,col=col[packet.number()])})
![Page 17: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/17.jpg)
Pie chart
data<-read.csv("data\\piedata.csv",header=T)pie(data$amounts,labels=as.character(data$names))
![Page 18: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/18.jpg)
Boxplot/Barplot
source("boxplot.R")
![Page 19: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/19.jpg)
barplot
Barplot(tapply(Countries$Population,Countries$Region,sum) ,main="Population",col=rainbow(nlevels(Countries$Region)))
![Page 20: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/20.jpg)
scatterplots
source(“scatterplot.R")
![Page 21: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/21.jpg)
Bubble plot
source("bubble.R")
![Page 22: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/22.jpg)
Time series
source(“ts.R”)
![Page 23: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/23.jpg)
coplot
source("ozone.R")
![Page 24: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/24.jpg)
Interaction plot
source("interaction.R")
![Page 25: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/25.jpg)
Quantitative Data Analysis
Data preprocessing
![Page 26: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/26.jpg)
Missing valuesRemove the cases with unknownsFill in the unknown values by exploring the properties of the variableFill in the unknown values by exploring the correlations between variablesFill in the unknown values by exploring the similarity between cases
![Page 27: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/27.jpg)
Transformations of the response and explanatory variables
Linearize the relationship between the response and the explanatory variableslogy against x for exponential relationships;logy against logx for power functions;expy against x for logarithmic relationships;1/y against 1/x for asymptotic relationships;logp/1−p againstx for proportion data.Other transformations are useful for variance stabilization: √y to stabilize the variance for count data; arcsin(y) to stabilize the variance of percentage data.
![Page 28: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/28.jpg)
Quantitative Data Analysis
Data modelling
![Page 29: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/29.jpg)
Exponential functions
exp.R
![Page 30: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/30.jpg)
Power functions
power.R
![Page 31: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/31.jpg)
Polynomial functions
polinomials.R
![Page 32: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/32.jpg)
Inverse polynomial
invpol.R
![Page 33: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/33.jpg)
Gamma function
gamma.R
![Page 34: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/34.jpg)
Asymptotic functions
![Page 35: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/35.jpg)
Asymptotic functions
michaelis.R
![Page 36: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/36.jpg)
Asymptotic functions
logistic.R
![Page 37: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/37.jpg)
fitting1.R
![Page 38: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/38.jpg)
fitting2.R
![Page 39: Data exploration and graphics with R](https://reader033.vdocuments.net/reader033/viewer/2022052618/554d9886b4c905525e8b496e/html5/thumbnails/39.jpg)
fitting3.R