lecture7

# lecture7 - ISYE6414 Summer 2010 Lecture 7 Multiple...

This preview shows pages 1–4. Sign up to view the full content.

ISYE6414 Summer 2010 Lecture 7 Multiple Regression More Features Dr. Kobi Abayomi June 22, 2010 1 Introduction Sophisticated users of linear models appreciate the simple way in which many predictors (or covariates) can be included with the response variable. Model diagnosis is the setting where (the sometimes inevitable) violations of the linear model are detected; it is the exploration of these departures that are the rich work of statisticians. Of course, you will never just estimate parameters and then go on your merry way. .. 2 Extra Sums of Squares Let’s use a multiple regression model on 3 covariates as the illustration Y = β 0 + 3 X i =1 β i X i + ± i We call the extra sum of squares of regression, for X 3 given X 1 ,X 2 SSR ( X 3 | X 1 ,X 2 ) = SSR ( X 1 ,X 2 ,X 3 ) - SSR ( X 1 ,X 2 ) or 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
SSR ( X 3 | X 1 ,X 2 ) = SSE ( X 1 ,X 2 ) - SSE ( X 1 ,X 2 ,X 3 ) The extra sum of squares is the marginal change (in error, SSE , or regression, SSR ) in sum of squares when X 3 is added to X 1 ,X 2 . Remember that the SSR increases as the diﬀerence between the model ﬁt and a null ﬁt increases; the SSR is just measure of the deviation ˆ y - y . Remember that SST = SSR + SSE so an increase in SSR is matched by a decrease in SSE as SST — the natural variation in the data ( y - y ) — is ﬁxed. Let’s look at an example in R gpagos<-read.csv(galapagos.csv) ybar<-mean(gpagos\$Species) lmfull<-lm(Species~ Endemics + Area + Elevation, data=gpagos) lmreduced<-lm(Species~Endemics + Area, data=gpagos) afull<-(lmfull\$fitted.values -rep(ybar,length(lmfull\$fitted.values))) SSRfull<- sum(afull^2) t(afull)%*%(afull) ared<-(lmreduced\$fitted.values -rep(ybar,length(lmreduced\$fitted.values))) SSRreduced<- sum(ared^2) t(ared)%*%(ared) SSRfull-SSRreduced SSEfull<-t(lmfull\$residuals)%*%lmfull\$residuals SSEreduced<-t(lmreduced\$residuals)%*%lmreduced\$residuals 2
SSEreduced-SSEfull f<-((SSEreduced-SSEfull)/1) / (SSEfull/26) qf(.95,1,26) sqrt(f) summary(lmfull) In general, we can write SSR ( X i ,X j | X k ) = SSR ( X i ,X j ,X k ) - SSR ( X k ) for the extra sum of squares between a three covariate and one covariate model. Implicitly, the hypothesis test i H 0 : β i = β k = 0 which we reject for large values of F . 2.1 ANOVA decomposition Take a look at this ANOVA decomposition: Source/SS df MS F SSR k SSR/k SSR k / SSE n - k SSR ( X 1 ) 1 SSR ( X 1 ) / 1 SSR ( X 1 ) 1 / SSE n - k SSR ( X 2 | X 1 ) 1 SSR ( X 2 | X 1 ) / 1 SSR ( X 2 | X 1 ) 1 / SSE n - k SSR ( X 3 | X 1 ,X 2 ) 1 SSR ( X 3 | X 1 ,X 2 ) / 1 SSR ( X 3 | X 1 ,X 2 ) 1 / SSE n - k SSE n - ( k + 1) SSE n - ( k +1) SST n - 1 Of course this relationship holds SSR = SSR ( X 1 ) + SSR ( X 2 | X 1 ) + SSR ( X 3 | X 1 ,X 2 ) = SSR ( X 1 ) + SSR ( X 2 ,X 1 ) - SSR ( X 1 ) + SSR ( X 1 ,X 2 ,X 3 ) - SSR ( X 1 ,X 2 ) = SSR ( X 1 ,X 2

This preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}

### Page1 / 11

lecture7 - ISYE6414 Summer 2010 Lecture 7 Multiple...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online