Matrix Multiplication
Rank and Dependency n Columns of a matrix: n Matrix A:
Linear Combinations n Columns: n Linear Combination: “Nontrivial” if at least one is not 0 ** Columns are dependent if there is a nontrivial linear combination for which:
Rank n The RANK of a matrix is the maximum number of linearly independent columns that can be selected from the columns of the matrix. n Rank of X is same as rank of X’X. n A matrix is invertible only if u It is square and u It is of FULL RANK
Example - Look for Dependency DEPENDENT? MAYBE, MAYBE NOT!
Same Example (con.t) DEPENDENT? YES !!!!
* * * * * * * * * * * * * * * * * X Y r i
Class Variables Data Set X MATRIX
Treatment 1: Treatment 2: Treatment 3:
X YA 2 20 A 5 24 A 8 22 A A A X YB 2 15 B 6 19 B 7 20 B B B X YC 1 2 C 5 8 C 9 12 C C C 15 20
A 2 20 A 5 24 A 8 22 A A A B 2 15 B 6 19 B 7 20 B B B C 1 2 C 5 8 C 9 12 C C C X= <== One column One slope
A 2 20 A 5 24 A 8 22 A A A B 2 15 B 6 19 B 7 20 B B B C 1 2 C 5 8 C 9 12 C C C X = <== Add TRT*X Interaction
PROC GLM; CLASS TRT; MODEL Y = TRT X TRT*X; F test to delete TRT*X What is being tested? Key => What is REDUCED MODEL? Y = TRT X ==> Single slope Testing …… H0: Arbitrary lines H1: Parallel lines
PROC GLM; CLASS TRT; MODEL Y = TRT TRT*X; One dependency in TRT NO dependencies in TRT*X F for TRT*X What is it testing NOW? Reduced model = ? MODEL Y=TRT All slopes 0 H0: All slopes 0 (not just equal) H1: Arbitrary slopes
PROC GLM; CLASS TRT; MODEL Y = TRT TRT*X; One dependency in TRT
Parameter Estimate Estimate INTERCEPT B TRT A B B B C B X Covariance adjusted means NOTE: The X'X matrix has been found to be singular... <=
grade IQ study b 1 b 2 b 0
grade IQ study “Interaction”!
IQ= IQ=