# B find a suitable design matrix w and coefficient

• Test Prep
• 6
• 100% (1) 1 out of 1 people found this document helpful

This preview shows page 3 - 6 out of 6 pages.

b. Find a suitable design matrixWand coefficient vectorβ= (γA, γB, γC) such that forthe regression modelM2:
c. Show that(y-Xˆβ)(y-Xˆβ) = (y-Wˆγ)(y-Wˆγ).Hint: Find a suitable matrixG3×3such thatW=XG. IfGis invertible, then ˆγ=G1ˆβ, such thatWˆγ= (XG)(G1ˆβ) =Xˆβ.d. LetAsummationdisplayi:xi=AyiandS2A=summationdisplayi:xi=A(yi-¯yA)2
3
Midterm 2: Practice Questionsdenote the mean and sum-of-squares for the responses of the patients having takenmedicationA, with similar definitions for ¯yB,S2B, ¯yC, andS2C. Show that(y-Wˆγ)(y-Wˆγ) =S2A+S2B+S2C.Hint: Ifwiis theith row ofW, show thatwiˆγmust be ˆγA= ¯yA, ˆγB= ¯yB, or ˆγC= ¯yC.e. Consider the null hypothesisH0: all three medications have the same effect.Show that theF-statistic for testingH0isni=1(yi-¯y)2-(S2A+S2B+S2C),for some numerical constantK. Find the value ofKand the distribution ofFunderH0.
4
STAT 331 - SYDE 334: Applied Linear ModelsFormula SheetNotation.For vectorsx= (x1, . . . , xn) andy= (y1, . . . , yn),¯x=1nnsummationdisplayi=1¯y=1nnsummationdisplayi=1yiSxx=nsummationdisplayi=1(xi-¯x)2Sxy=nsummationdisplayi=1(yi-¯y)(xi-¯x).Linear Regression Results.The multiple linear regression model isy∼ N(Xβ, σ2I)⇐⇒yi|xiind∼ N( ∑pj=1xijβj, σ2),i= 1, . . . , n.The loglikelihood for this model is(β, σ|y, X) =-12(ˆβ-β)XX(ˆβ-β) +eeσ2-n2log(σ2),where the MLE ofβisˆβ= (XX)1Xy, ande=y-Xˆβ.ˆβandeare independent, and1σ2eeχ2(np).