{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture4

# lecture4 - Lecture 5 Multiple Linear Regression Nancy R...

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

Lecture 5: Multiple Linear Regression Nancy R. Zhang Statistics 203, Stanford University January 19, 2010 Nancy R. Zhang (Statistics 203) Lecture 5 January 19, 2010 1 / 25

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

View Full Document
Agenda Today: multiple linear regression. This week: comparing nested models in multiple linear regression. Finish diagnostics slides next lecture. Nancy R. Zhang (Statistics 203) Lecture 5 January 19, 2010 2 / 25
How does land use affect river pollution? Nitrogen = 0 + 1 Agr + 2 Forest + 3 Rsdntial + 4 ComIndl + error Nancy R. Zhang (Statistics 203) Lecture 5 January 19, 2010 3 / 25

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

View Full Document
Multiple Linear Regression Design matrix: X = 0 B B B @ 1 X 11 X 21 X p 1 1 X 12 X 22 X p 2 . . . : : : . . . . . . 1 X 1 n X 2 n X pn 1 C C C A y = 0 B B B @ y 1 y 2 . . . y n 1 C C C A Squared error loss function: L ( ) = n X i = 1 0 @ y i 0 p X j = 1 j X ij 1 A 2 : In matrix notation: L ( ) = ( y X ) 0 ( y X ) : Nancy R. Zhang (Statistics 203) Lecture 5 January 19, 2010 4 / 25
Linear Subspaces and Projections With p predictors we have p + 1 vectors in < n : X i = 0 B B B @ X i 1 X i 2 . . . X in 1 C C C A ; i = 0 ; : : : ; p : From now on we will always let X 0 be the vector of ones. We denote by L ( X 0 ; : : : ; X p ) the linear space spanned by the vectors X 0 ; : : : ; X p : L ( X 0 ; : : : ; X p ) = ( p X i = 0 a i X i : ( a 0 ; : : : ; a p ) 2 < p + 1 ) : This is a linear subspace of < n . We use the shorthand L ( X ) . Nancy R. Zhang (Statistics 203) Lecture 5 January 19, 2010 5 / 25

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

View Full Document
The dimension of L ( X 0 ; : : : ; X p ) is equivalent to the rank of the matrix X = 0 B B B @ X 01 X 11 X p ; 1 X 02 X 12 X p ; 2 . . . : : : . . . . . . X 0 n X 1 n X p ; n 1 C C C A The rank of a matrix is equal to the number of linearly independent columns. The linear map that projects any vector v 2 < n onto L ( X ) can be obtained by P X = X ( X 0 X ) 1 X 0 . Nancy R. Zhang (Statistics 203) Lecture 5 January 19, 2010 6 / 25
Projection Matrices Thus, for any n p + 1 matrix X , we can construct a projection matrix P X = X ( X 0 X ) 1 X 0 that projects vectors onto the column space of X .

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 / 25

lecture4 - Lecture 5 Multiple Linear Regression Nancy R...

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

View Full Document
Ask a homework question - tutors are online