SlidesRLec6

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (i-10,1,lty=i) lty=0=blank, 1=solid (default), 2=dashed, 3=dotted, 4=dotdash, 5=longdash, 6=twodash −10 9 −5 0 5 10 Using Previously Imported ReactionTime Data Frame head(ReactionTime) Reaction Station Shift 1 86 ST64 B 2 182 ST64 B 3 132 ST64 B 4 196 ST64 B 5 160 ST64 A 6 3 ST65 A hist(ReactionTime$Reaction,breaks=seq(0,400,5)) # histogram bins cover [0,400] in increments of 5. hist(ReactionTime$Reaction,breaks=seq(0,400,5), main="EMS Turnout Time", xlab="time (seconds)") 10 hist(ReactionTime$Reaction, breaks=seq(0,400,5)) 0 50 Frequency 100 150 Histogram of ReactionTime$Reaction 0 100 200 ReactionTime$Reaction 11 300 400 hist(ReactionTime$Reaction, breaks= seq(0,400,5), main="EMS Turnout Time", xlab="time (seconds)", col=c("blue","orange")) 0 50 Frequency 100 150 EMS Turnout Time 0 100 200 time (seconds) 12 300 400 pcol <c("green","yellow","purple","red", "blue","gold","black","cyan","orange") plot(1:25,1:25,pch=1:25,col=pcol) Plotting Symbols and Colors: 25 See all 657 color names via colors(). 20 q q q 1:25 15 q 10 q 5 q q 5 13 10 15 1:25 20 25 plot(1:25,1:25, pch=letters[1:25],col=pcol) points(1:25,25:1,pch=rep(c(".","*"), length.out=25),col=pcol) 25 Character Plotting Symbols: * 20 * * 15 * n 5 10 1:25 * a b c d e g j k p r s u v x y *m l* * * * * * 5 14 f h i o q t w 10 15 20 25 Normal QQ-Plot x <- rnorm(100) # x is a standard normal random sample, n=100 qqnorm(x,pch=16,cex=.5) # makes QQ-plot of sample > qqline(x) # adds a fitted line to the previous plot. # line is fitted through 1st and 3rd quartiles 15 qqnorm(x,pch=16,cex=.5) qqline(x) Normal Q−Q Plot 2 q q q q q q q q q q q q q q q q q qq qq q q q qq q 0 Sample Quantiles 1 q qq q qqq qq q qq qq q qqq qq q qq q qqq qqq qqq q qqq q q q q q q qq q q q qq q −1 q qqq q q qq q q q q q q q q q q q q −2 q −2 −1 0 Theoretical Quantiles 16 1 2 q Normal QQ-Plot n = 30 par(mfrow=c(2,3)) x <- rnorm(30);qqnorm(x);qqline(x) x <- rnorm(30);qqnorm(x);qqline(x) x <- rnorm(30);qqnorm(x);qqline(x) x <- rnorm(30);qqnorm(x);qqline(x) x <- rnorm(30);qqnorm(x);qqline(x) x <- rnorm(30);qqnorm(x);qqline(x) The par function controls many plotting parameters. =⇒ ?par. Some plotting parameters work within the plotting function, others only wit...
View Full Document

This note was uploaded on 02/25/2014 for the course STAT 302 taught by Professor Fritz during the Winter '13 term at University of Washington.

Ask a homework question - tutors are online