SlidesRLec7

E 9 variability explained by the regression on x is

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: SYY − RSS = SSreg = 8 SXY 2 SXX Multiple Correlation Coecient R 2 The multiple correlation coecient or coecient of determination R2 = = SSreg SYY − RSS SXY 2 RSS /(n − 1) = = =1− SYY SYY SXX · SYY SYY /(n − 1) proportion of Note that x 's and R2 y 's, i.e., 9 variability explained by the regression on X. is just the square of the Pearson correlation between i.e., The adjusted Y √ r = SXY / SXX · SYY . ¯ R2 = R2 uses n−2 in the RSS denominator above, RSS /(n − 2) n−1 ¯ R2 = 1 − =1− (1 − R 2 ) SYY /(n − 1) n−2 Comments with(spirit,plot(gas,weight)) # avoids the clumsy plot(spirit\$gas,spirit\$weight, xlab="gas",ylab="weight") # similarly, use fit <- with(spirit,lm(weight~gas)) # but not with(spirit,fit <- lm(weight~gas)) # Hall’s report gives gasoline at # 6.12 lbs per gallon # It would seem that they figured # the weight of aircraft from that 10 Aircraft Weight vs Takeo Distance with(spirit, plot(TO.distance,weight, xlim=c(200,3000),ylim=c(2000,6000))) x <- seq(200,3000,10) y <- 10^2.6503023 * x^0.3237002; lines(x,y) points(c(2000,3000),c(5000,5500),pch=16,col="red") with(spirit, plot(TO.distance,weight,log="xy", xlim=c(200,3000),ylim=c(2000,6000))) fit <- with(spirit, lm(log10(weight)~log10(TO.distance))) fit\$coef (Intercept) log10(TO.distance) 2.6503023 0.3237002 abline(fit,col="blue") points(c(2000,3000),c(5000,5500),pch=16,col="red") qqnorm(fit\$residuals); qqline(fit\$residuals...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online