Loading [MathJax]/jax/output/CommonHTML/jax.js
+ - 0:00:00
Notes for current slide
Notes for next slide

More on the Hat Matrix

Dr. D’Agostino McGowan

1 / 32

Matrix fact

  • If a matrix is symmetric, then A=AT
2 / 32

Matrix fact

  • If a matrix is symmetric, then A=AT
  • If a matrix is idempotent, then ATA=A
2 / 32

Matrix fact

  • If a matrix is symmetric, then A=AT
  • If a matrix is idempotent, then ATA=A
  • The hat matrix, H, is both symmetric and idempotent
2 / 32

The hat matrix is symmetric

H=HT

3 / 32

The hat matrix is symmetric

H=HTX(XTX)1XT=(X(XTX)1XT)T

4 / 32

The hat matrix is symmetric

H=HTX(XTX)1XT=(X(XTX)1XT)TX(XTX)1XT=X(XTX)1XT

5 / 32

The hat matrix is idempotent

HTH=H

6 / 32

The hat matrix is idempotent

HTH=HHH=H

7 / 32

The hat matrix is idempotent

HTH=HHH=HX(XTX)1XTX(XTX)1XT=X(XTX)1XT

8 / 32

The hat matrix is idempotent

HTH=HHH=HX(XTX)1XTX(XTX)1XT=X(XTX)1XTX(XTX)1XTX(XTX)1IXT=X(XTX)1XT

9 / 32

The hat matrix is idempotent

HTH=HHH=HX(XTX)1XTX(XTX)1XT=X(XTX)1XTX(XTX)1XTX(XTX)1IXT=X(XTX)1XTX(XTX)1XT=X(XTX)1XT

10 / 32

The hat matrix is idempotent

HTH=HHH=HX(XTX)1XTX(XTX)1XT=X(XTX)1XTX(XTX)1XTX(XTX)1IXT=X(XTX)1XTX(XTX)1XT=X(XTX)1XT

  • IH is also idempotent
10 / 32

The trace of the hat matrix is p+1

tr(H)

11 / 32

The trace of the hat matrix is p+1

tr(H)

Matrix fact

  • The trace of a square matrix, written as tr(A), is the sum of the diagonal elements
  • tr(A+B)=tr(A)+tr(B)
  • tr(cA)=ctr(A)
  • tr(ABC)=tr(BCA)=tr(CAB)
11 / 32

The trace of the hat matrix is p+1

tr(H)=tr(X(XTX)1XT)

12 / 32

The trace of the hat matrix is p+1

tr(H)=tr(X(XTX)1XT)=tr(XTX(XTX)1)

13 / 32

The trace of the hat matrix is p+1

tr(H)=tr(X(XTX)1XT)=tr(XTX(XTX)1)=tr(I)

14 / 32

The trace of the hat matrix is p+1

tr(H)=tr(X(XTX)1XT)=tr(XTX(XTX)1)=tr(I)

What are the dimensions of this I?

14 / 32

The trace of the hat matrix is p+1

tr(H)=tr(X(XTX)1XT)=tr(XTX(XTX)1)=tr(I)

What are the dimensions of this I?

  • Xn×(p+1)
14 / 32

The trace of the hat matrix is p+1

tr(H)=tr(X(XTX)1XT)=tr(XTX(XTX)1)=tr(I)

What are the dimensions of this I?

  • Xn×(p+1)
  • I(p+1)×(p+1)
14 / 32

The trace of the hat matrix is p+1

tr(H)=tr(X(XTX)1XT)=tr(XTX(XTX)1)=tr(I)

What are the dimensions of this I?

  • Xn×(p+1)
  • I(p+1)×(p+1)
  • tr(I(p+1)×(p+1))=p+1
14 / 32

RSS

eTe=(yˆy)T(yˆy)

15 / 32

RSS

eTe=(yˆy)T(yˆy)=(yHy)T(yHy)

16 / 32

RSS

eTe=(yˆy)T(yˆy)=(yHy)T(yHy)=((IH)y)T(IH)y

17 / 32

RSS

eTe=(yˆy)T(yˆy)=(yHy)T(yHy)=((IH)y)T(IH)y=yT(IH)T(IH)y

18 / 32

RSS

eTe=(yˆy)T(yˆy)=(yHy)T(yHy)=((IH)y)T(IH)y=yT(IH)T(IH)y=yT(IH)y

19 / 32

RSS

E[eTe]=E[yT(IH)y]

20 / 32

RSS

E[eTe]=E[yT(IH)y]

Matrix fact

E[XTCX]=E[X]TCE[X]+tr(Cvar(X))

20 / 32

RSS

E[eTe]=E[yT(IH)y]

21 / 32

RSS

E[eTe]=E[yT(IH)y]=E[y]T(IH)E[y]+tr((IH)var(y))

22 / 32

RSS

E[eTe]=E[yT(IH)y]=E[y]T(IH)E[y]+tr((IH)var(y))=βTXT(IH)Xβ+σ2tr(IH)

23 / 32

RSS

E[eTe]=E[yT(IH)y]=E[y]T(IH)E[y]+tr((IH)var(y))=βTXT(IH)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H)=βTXT(XβX(XTX)1XTXβ)+σ2tr(IH)=βTXT(XβX(XTX)1XTXIβ)+σ2tr(IH)=βTXT(XβXβ)+σ2tr(IH)=βTXT(0)+σ2tr(IH)=σ2tr(IH)=σ2(tr(In×n)tr(H))

30 / 32

RSS

E[eTe]=E[yT(IH)y]=E[y]T(IH)E[y]+tr((IH)var(y))=βTXT(IH)Xβ+σ2tr(IH)=βTXT(XβHXβ)+σ2tr(IH)=βTXT(XβX(XTX)1XTXβ)+σ2tr(IH)=βTXT(XβX(XTX)1XTXIβ)+σ2tr(IH)=βTXT(XβXβ)+σ2tr(IH)=βTXT(0)+σ2tr(IH)=σ2tr(IH)=σ2(tr(In×n)tr(H))=σ2(ntr(H))

31 / 32

RSS

E[eTe]=E[yT(IH)y]=E[y]T(IH)E[y]+tr((IH)var(y))=βTXT(IH)Xβ+σ2tr(IH)=βTXT(XβHXβ)+σ2tr(IH)=βTXT(XβX(XTX)1XTXβ)+σ2tr(IH)=βTXT(XβX(XTX)1XTXIβ)+σ2tr(IH)=βTXT(XβXβ)+σ2tr(IH)=βTXT(0)+σ2tr(IH)=σ2tr(IH)=σ2(tr(In×n)tr(H))=σ2(ntr(H))=σ2(n(p+1))

32 / 32

Matrix fact

  • If a matrix is symmetric, then A=AT
2 / 32
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow