Q q q q q q q qq qqq q q q q q q qq q q qq q q q q q

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: 1] 5 4.0 4.5 5.0 plot(faithful[,1],faithful[,2]), xlab="eruption length (min)", ylab= "waiting time to next eruption (min)") q q q q q 90 q q q q q qq q 80 q q q q q 70 q q q q q qq qq qq qq q qq q q qq q qq q q qq qq q q q q q q qq qq qq q q q qq q qq q q q q qq q q q q q qq q q q q qq q qq q q q q q qq q q qq qq q q qq qq q q q q q qq qq q q q q qq q q q qq q q q q qq q q qq q q q qq qqq q q q q q q q q q q q q q 50 q q q q q q q q qq q q q q q q q q q q q 60 waiting time to next eruption (min) q q q q qqq q q q q q q qq q qq q qq q qq qq q qq q q q q q qq qq q q qq q qq q q q q q q q q qq qqq q q q q q q qq q q qq q q q q q 1.5 2.0 2.5 3.0 3.5 eruption length (min) 6 4.0 4.5 5.0 Faithful Eruptions and Fitted Line fit <- lm(waiting ~ eruptions, data=faithful) plot(faithful[,1],faithful[,2], xlab="eruption length (min)", ylab="waiting time to next eruption (min)") lines(faithful$eruptions,fitted(fit), col="red",lwd=2,lty=4) abline(fit) lm ts waiting as linear function of eruptions data=faithful indicates reference data set, avoids using faithful$waiting, etc. fitted(fit) gives the tted values (y-coordinates). abline(fit) draws a straight line with a and b from fit. 7 Faithful Eruptions and Fitted Line: The Plot q q q q q 90 q q q q q qq q q q 80 q q q q q 70 q qq qq qq q qq q qq q q qq qq q q q q q q qq qq qq q q q qq q qq q q q q qq q q q q q qq q q q q qq q qq q q q q q qq q q qq qq q q qq qq q q q q q qq qq q q q q qq q q q qq q q q q qq q q qq q q q qq qqq q q qq q q qq q q q q q q q q q q q q 50 q q q q q q q q q qq q q q q q q q q q q q 60 waiting time to next eruption (min) q q q q qqq q q q q q q qq q qq q qq q qq qq q qq q q q q q qq qq q q qq q qq q q q q q q q q qq qqq q q q q q q qq q q qq q q q q q 1.5 2.0 2.5 3.0 3.5 eruption length (min) 8 4.0 4.5 5.0 Line Types: lty −10 −5 0 5 10 plot(0,0,xlim=c(-10,10),ylim=c(-10,10), type="n",xlab="",ylab="") for(i in 1:20) abline...
View Full Document

Ask a homework question - tutors are online