100%(2)2 out of 2 people found this document helpful
This preview shows page 36 - 40 out of 48 pages.
in the model should be large (relative to MSE)Formally if all model assumption holdF=(SSR(ˆβ)-SSR(ˆβA))/pBMSE∼H0F(pb, n-p-1)IfF > Fα(pB, n-p-1), then we rejectH0with significance levelα, O.W.,H0is notrejected.Note thatSST-SSR(ˆβ) =SSESST-SSR(ˆβA) =SSE0whereSSE0is sum of squares of residuals leaving outXB(fitting the model subject toH0) Then the differenceSSE0-SSE=SSR(ˆβ)-SSR(ˆβA)Thus if the extra sum of squares of regression is small:36
•The two models have similar residual sum of squares =⇒the two models fit aboutthe source•we choose simpler model =⇒we do not rejectH0.Mathematically,F=(SSR(ˆβ)-SSR(ˆβA))/pBMSE=(SSE0-SSE)/pBMSE8.2.2The general linear hypothesisTo test the very general hypothesis concerning the regression coefficientsβH0:Tβ=bwhere T is ac×(p+ 1) matrix of constance, and b is ac×1 vector of constance.For example,y=β0+β1x1+β2x2+β3x3+the null hypothesisH0:β0= 0 andβ1=β2100001-10β0β1β2β3=00thusH0:Tβ=b.To testH0:Tβ=bin general1. Fit regression with no constrains2. Compute SSE3. Fit regression model subject to constrains4. Compute the newSSE05. Compute F-ratioF=(SSE0-SSE)/cSSE/(n-p-1)6. IfF > Fα(c, n-p-1), then reject the null hypothesis; otherwise, not reject.ConsiderH0:β2=β3= 000100001β0β1β2β3=0037
8.3Categorical Predictors and InteractionTerms8.3.1Binary predictorRecall low both weight infant example:y: head circax1: best agex2: toxaemia,1 = “yes”,0 = “No”Consider modely=β0+β1x1+β2x2+ˆy= 1.496 + 0.874x1-1.412x2+•testingβ2= 0It is often not reasonable to assume the effect of other explanatory variables are someacross different groupsInteraction terms:y=β0+β1x1+β2x2+β3x1x2+=⇒(y=β0+β1x1+ifx2= 0y=β0+β2+ (β1+β3)x1+ifx2= 1by adding interaction term, it allowsX1to have a different effect on y depending on thevalue ofx2.8.3.2Hypothesis Testing of Interaction TermH0:β3= 0 v.s.Ha:β36= 0tells whether the effect is different or not between groups.8.3.3categorical predictor with more than 2 levelsExampley: prestige score of occupationsexp. var : education (in years),incometype of occupation : blue collar, white collar, professionalDummy variable :D1=(1professional0O. W., D2=(1white collar0O. W.38
type of occupationD1D2professional10white collar01blue collar00The categorical exp var. with k levels can be represented byk-1 dummies.The regression modely=β0+β1x1+β2x2+β3D1+β4D2+profy= (β0+β3) +β1x1+β2x2+w.c.y= (β0+β4) +β1x1+β2x2+b.c.y=β0+β1x1+β2x2+whereβ3represents the constant vertical distance between the paralleled regression planesfor prof and b.c.occupation.β4represents the constant vertical distance between theparalleled regression planes for w.c. and b.c. occupation.