Upload
alberto-labarga
View
1.212
Download
1
Embed Size (px)
DESCRIPTION
Quantitative Data Analysis - Part II: Data exploration and graphics - Master in Global Environmental Change - IE University
Citation preview
Quantitative Data Analysis
Data exploration and graphics
Russian most extreme summer
http://joewheatley.net/russian-grain/
acpclust.R
More linkshttp://www.statmethods.net/http://addictedtor.free.fr/graphiques/http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/
Plots and charts
Low level functions
graphical parameters: par()
Lattice package
Curves and functionsx<-seq(-2,2,0.01)y<-x^3-3*xplot(x,y,type="l")
Orcurve(x^3-3*x, -2, 2)
Histogram
histogram
histogram(~Countries$Population|Countries$Region)
histogram
histogramhistogram(~Population|Region,data=Countries, col=2:6,panel=function(x,...,col) { panel.histogram(x,...,col=col[packet.number()])})
Pie chart
data<-read.csv("data\\piedata.csv",header=T)pie(data$amounts,labels=as.character(data$names))
Boxplot/Barplot
source("boxplot.R")
barplot
Barplot(tapply(Countries$Population,Countries$Region,sum) ,main="Population",col=rainbow(nlevels(Countries$Region)))
scatterplots
source(“scatterplot.R")
Bubble plot
source("bubble.R")
Time series
source(“ts.R”)
coplot
source("ozone.R")
Interaction plot
source("interaction.R")
Quantitative Data Analysis
Data preprocessing
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
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.
Quantitative Data Analysis
Data modelling
Exponential functions
exp.R
Power functions
power.R
Polynomial functions
polinomials.R
Inverse polynomial
invpol.R
Gamma function
gamma.R
Asymptotic functions
Asymptotic functions
michaelis.R
Asymptotic functions
logistic.R
fitting1.R
fitting2.R
fitting3.R