06a_MatrixSLR

06a_MatrixSLR - Statistical Techniques II EXST7015...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Statistical Techniques II EXST7015 Regression with Matrix Algebra 06a_Matrix SLR 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Matrix Algebra We will not be doing our regressions with matrix algebra, except that the computer does employ matrices. In fact, there is really no other way to do the basic calculations. You will be responsible for knowing about matrices only to the extent that PROC REG or PROC GLM produces information. This is primarily the initial and final matrices. 06a_Matrix SLR 2
Background image of page 2
So, what is a matrix? A matrix is a rectangular arrangement of numbers, usually represented by an upper case letter (A, B, C, D, etc.) A = D = Matrix Algebra (continued) 424 160 305 23 0 L N M M M M O Q P P P P 13 79 L N M O Q P 06a_Matrix SLR 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
The dimensions of a matrix are given by the number of rows and columns in the matrix (i.e. the dimensions are r by c). For the matrices above, A is 2 by 2 D is 4 by 3 Matrix Algebra (continued) 06a_Matrix SLR 4
Background image of page 4
Matrix Algebra (continued) For a simple linear regression the matrices of initial interest would be the data matrices, a Y matrix of values of the dependent variable and an X matrix of values of the independent variable. The X matrix also has a column of ones added to fit the intercept. 06a_Matrix SLR 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
Matrix Algebra (continued) Y Y Y Y Y Y Y Y 1 2 3 4 5 6 7 = L N M M M M M M M M M O Q P P P P P P P P P X X X X X X X X 1 2 3 4 5 6 7 = L N M M M M M M M M M O Q P P P P P P P P P 1 1 1 1 1 1 1 06a_Matrix SLR 6
Background image of page 6
Matrix Algebra (continued) As with our algebraic calculations we need some intermediate values; sums, sums of squares and cross-products. These are obtained by calculating First, a transpose matrix for both X and Y. This is simply the matrix turned on its side so the rows of the original matrix become the columns of the transpose. These are denoted X' and Y'. 06a_Matrix SLR 7
Background image of page 7

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

View Full DocumentRight Arrow Icon
Matrix Algebra (continued) ′ = L N M O Q P X XX X X X 1234567 1111111 ′ = Y Y YYYY YY 12 34567 06a_Matrix SLR 8
Background image of page 8
Matrix Algebra (continued) We now calculate 3 matrices, X'X, Y'Y and X'Y. This requires matrix multiplication. = L N M O Q P L N M M M M M M M M M O Q P P P P P P P P P XX X X X X X X X X 1234567 1 2 3 4 5 6 7 1111111 1 1 1 1 1 1 1 06a_Matrix SLR 9
Background image of page 9

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

View Full DocumentRight Arrow Icon
Matrix Algebra (continued) Calculate X'X, Y'Y and X'Y (continued) . = L N M M M M M M M M M O Q P P P P P P P P P YY Y Y Y Y Y Y Y Y Y Y Y Y 1234567 1 2 3 4 5 6 7 06a_Matrix SLR 10
Background image of page 10
Matrix Algebra (continued) Calculate X'X, Y'Y and X'Y (continued) .
Background image of page 11

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

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 36

06a_MatrixSLR - Statistical Techniques II EXST7015...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online