230 likes | 257 Views
Learn about matrix rank and dependencies, how to identify linear combinations, and discover dependency in a given dataset.
E N D
Rank and Dependency • Columns of a matrix: • Matrix A:
Linear Combinations • Columns: • Linear Combination: “Nontrivial” if at least one l is not 0 ** Columns are dependent if there is a nontrivial linear combination for which:
Rank • The RANK of a matrix is the maximum number of linearly independent columns that can be selected from the columns of the matrix. • Rank of X is same as rank of X’X. • A matrix is invertible only if • It is square and • It is of FULL RANK
Example - Look forDependency DEPENDENT? MAYBE, MAYBE NOT!
Same Example (con.t) DEPENDENT? YES !!!!
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * S ri2 Y X
Class Variables • Data Set X MATRIX
Treatment 1: Treatment 2: Treatment 3:
A 2 20 A 5 24 A 8 22 A 11 28 A 14 26 A 17 25 X Y B 2 15 B 6 19 B 7 20 B 12 26 B 14 30 B 17 28 X Y C 1 2 C 5 8 C 9 12 C 11 10 C 14 18 C 15 20 X Y
A 2 20 A 5 24 A 8 22 A 11 28 A 14 26 A 17 25 2 5 8 11 14 17 2 6 7 12 14 17 1 5 9 11 14 15 B 2 15 B 6 19 B 7 20 B 12 26 B 14 30 B 17 28 <== One column One slope X= C 1 2 C 5 8 C 9 12 C 11 10 C 14 18 C 15 20
0 0 0 0 0 0 0 0 0 0 0 0 1 5 9 11 14 15 2 0 5 0 8 0 11 0 14 0 17 0 0 2 0 6 0 7 0 12 0 14 0 17 0 0 0 0 0 0 0 0 0 0 0 0 A 2 20 A 5 24 A 8 22 A 11 28 A 14 26 A 17 25 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 2 5 8 11 14 17 2 6 7 12 14 17 1 5 9 11 14 15 <== Add TRT*X Interaction B 2 15 B 6 19 B 7 20 B 12 26 B 14 30 B 17 28 X = C 1 2 C 5 8 C 9 12 C 11 10 C 14 18 C 15 20
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
Covariance adjusted means Parameter Estimate Estimate INTERCEPT 4.0123 B TRT A 12.2217 B B 10.9158 B C 0.0000 B X 0.8350 • <= • <= • <= NOTE: The X'X matrix has been found to be singular ...
b 1 b 2 b 0 grade IQ study
“Interaction”! grade IQ study
-14.300 -13.00 +5.30 +5.83 IQ=100 IQ=110 IQ=100 IQ=110 110 110 100 100