Satoshi Kajimoto , Ryo Y amada
description
Transcript of Satoshi Kajimoto , Ryo Y amada
A rotation matrix , which is useful to interpret the restriction of marginal counts of multi-way tables
Satoshi Kajimoto , Ryo YamadaUnit of statistical genetics, Center for Genomic
Medicine ,Graduate School of Medicine, Kyoto University , Kyoto, Japan
Objective
We introduce how to make the matrix X, that gives coordinates of df-dimensional space to multi-way tables.
The chart of this presentation
• Step1 Introduction• Step2 How to make the matrix X– Simplex– Simplex matrix– Kronecker product• These three terms are needed to make the matrix X.
• Step3 The properties of the matrix X• Step4 Applications of the matrix X
The chart of this presentation
• Step1 Introduction• Step2 How to make the matrix X– Simplex– Simplex matrix– Kronecker product• These three terms are needed to make the matrix X.
• Step3 The properties of the matrix X• Step4 Applications of the matrix X
shape 2×3×42×3𝒓=(23) 𝒓=(234 )shape vector
The number of the cells
R=
R= 24
𝒓=(𝑟 1𝑟 2⋮𝑟𝑘
)
dimension (k=) 2 (k=) 3
R= 6
multi-way table(k-dimensional table)
10 17 13
11 14 12
one-to-oneThe matrix X( square matrix)
shape vector
𝒓=(23) (1
√61
√61
√61√6
−1√6
1√6
1√3
1√3
−12√3
−
1
√61
√61
√61√6
1√6
−1√6
−12√3
−12√3
−12√3
1
√3−1
√3−12√3
0 012
0 012
12√3
−12√3
12√3
12
−12
−12
−12
−12
12
)
10 17 13
11 14 12
2×3 table
The chart of this presentation
• Step1 Introduction• Step2 How to make the matrix X– Simplex– Simplex matrix– Kronecker product• These three terms are needed to make the matrix X.
• Step3 The property of the matrix X• Step4 Applications of the matrix X
Now, We will explain 3 terms , which need to make the matrix X
• Simplex• Simplex matrix• Kronecker product
Simplex
A simplex is a generalization of the notion of a regular triangle or regular tetrahedron to arbitrary dimension.
1-simplex 2-simplex 3-simplex
n-simplex
1-simplex 2-simplex 3-simplex
(0,1,0)
(1,0,0)
(0,0,1)
y
z
x
2-simplex in 3 dimensional orthogonal coordinate system
A 2-simplex is a regular triangle.A 3-simplex is a regular tetrahedron.
An (n-1)-simplex can be put in n-dimensional orthogonal coordinate system.
Simplex matrix
An n-simplex matrix is a matrix whose column vectors are the coordinates of vertices of the (n-1)- simplex.
𝑣1
𝑣2
𝑣1
𝑣3
𝑣4
𝑣4𝑣3𝑣2 : coordinates of vertices of 3-simplex
4-simplex matrix =
(0,1,0)
(1,0,0)
(0,0,1)
3-simplex matrix
Parallel to yz-plane
x
y
z
x
y
rotation
𝑥=1
√3
1
√3
( 1√3 ,0)
1
We can rotate an (n-1) simplex which is put in n-dimensional orthogonal coordinate system to plane whose x-axis is .
Our way to make n-simplex matrix
An n-simplex matrix is the n×n matrix and defined as below.
𝑎 𝑗𝑘=1
√𝑛
{𝑎 𝑗𝑘=0( h𝑤 𝑒𝑛𝑘≦ 𝑗−2)
𝑎 𝑗𝑘=√𝑛− 𝑗+1𝑛− 𝑗+2
( h𝑤 𝑒𝑛𝑘= 𝑗−1)
𝑎 𝑗𝑘=−1
√(𝑛− 𝑗+1 ) (𝑛− 𝑗+2 )( h𝑤 𝑒𝑛𝑘≧ 𝑗)
𝑗>1
𝑗=1
(1
√31
√31
√3√2√3
−1√6
−1√6
01
√2−1
√2)(
1√2
1√2
1
√2−1
√2) (
12
12
√32
−12√3
12
12
−12√3
−12√3
0 √2√3
0 0
−1√6
−1√6
1√2
−1√2
)Examples of n-simplex matrix
Kronecker product
𝐴=(𝑎11 𝑎12𝑎21 𝑎22
⋯ 𝑎1𝑝⋯ 𝑎2𝑝
⋮ ⋮𝑎𝑝 1 𝑎𝑝 2
⋱ ⋮⋯ 𝑎𝑝𝑝
) 𝐵=(𝑏11 𝑏12𝑏21 𝑏22
⋯ 𝑏1𝑞⋯ 𝑏2𝑞
⋮ ⋮𝑏𝑞1 𝑏𝑞2
⋱ ⋮⋯ 𝑏𝑞𝑞
)𝑝×𝑝𝑚𝑎𝑡𝑟𝑖𝑥 𝑞×𝑞𝑚𝑎𝑡𝑟𝑖𝑥
𝑝𝑞×𝑝𝑞𝑚𝑎𝑡𝑟𝑖𝑥
𝐴⊗ 𝐵=(𝑎11𝐵 𝑎12𝐵𝑎21𝐵 𝑎22𝐵
⋯ 𝑎1𝑝𝐵⋯ 𝑎2𝑝 𝐵
⋮ ⋮ ⋱ ⋮𝑎𝑝 1𝐵 𝑎𝑝 2𝐵 ⋯ 𝑎𝑝𝑝𝐵
)
How to make the matrix X
𝒓=(𝑟 1𝑟 2⋮𝑟𝑘
) -
𝑋=𝑋𝑘⊗ 𝑋𝑘− 1⊗⋯⋯⊗ 𝑋 1( is the Kronecker product)⊗
X is matrix
For example
𝒓=(23) (the 2-simplex matrix)
(the 3-simplex matrix)
𝑋 1=(1√2
1√2
1
√2−1
√2) 𝑋 2=(
1
√31
√31
√3√2√3
−1√6
−1√6
01
√2−1
√2)
𝑋=𝑋 2⊗ 𝑋1=(1
√61
√61
√61√6
−1√6
1√6
1√3
1√3
−12√3
−
1
√61
√61
√61√6
1√6
−1√6
−12√3
−12√3
−12√3
1
√3−1
√3−12√3
0 012
0 012
12√3
−12√3
12√3
12
−12
−12
−12
−12
12
)
R
The chart of this presentation
• Step1 Introduction• Step2 How to make the matrix X– Simplex– Simplex matrix– Kronecker product• These three terms are needed to make the matrix X.
• Step3 The properties of the matrix X• Step4 Applications of the matrix X
1. X is an R×R rotation matrix.
We vectorize multi-way tables into vectors in R-dimensional space, and rotate them.
23 24
21 22
19 20
17 18
15 16
13 14
11 12
9 10
7 8
5 6
3 4
1 2
vectorize
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24)❑𝑡
2×4×3 tableThe contents of the table
z
x
2321
2422
20191817
1817
109
21
24
108
6
24
2220
18 1416
12
y
What does the rotation by X do ?• When two table vectors a and b share marginal
counts, • only df elements of rotated vectors a’ and b’
differ.
• a’=Xa, b’ = Xb
B𝒂 𝒃vectorizevectorize BA
40
60
10 20 70 100
3 11 267 9 44
35
75
17 23 70 110
7 11 1710 12 53
=
=
The relationship between the matrix X and marginal counts of tables
table A
table B
vector
vector
vectorized
vectorized
40
60
10 20 70 100
3 11 267 9 44
35
65
17 23 60 100
7 11 1710 12 43
=
=
table Avector vectorized
table B
vector vectorized
40
60
10 20 70 100
3 11 267 9 44
40
60
17 23 60 100
7 11 2210 12 38
=
=
table Avector vectorized
table B
vector vectorized
40
60
10 20 70 100
3 11 267 9 44
35
65
10 20 70 100
7 11 173 9 53
=
=
table Avector vectorized
table B
vector vectorized
40
60
10 20 70 100
3 11 267 9 44
40
60
10 20 70 100
7 11 223 9 48
=
=
The degrees of freedom of this table is 2.So, 2 elements of these two vectors are different, and 4 elements are equal.
Now, by using X,Tables are placed in df-dimensional space.
The chart of this presentation
• Step1 Introduction• Step2 How to make the matrix X– Simplex– Simplex matrix– Kronecker product• These three terms are needed to make the matrix X.
• Step3 The properties of the matrix X• Step4 Applications of the matrix X
Variations of df patterns in multi-way table
“Lectures on Algebraic Statistics” express a restriction of marginal counts in simplicial complex.
The matrix X is useful to grasp such a complex restriction.
Simplicial complexLectures on Algebraic StaticsISBN-13: 978-3764389048
df = 2
χ2 → p values χ2 p values
Ryo Yamada, Yukinori Okada, 2009, An Optimal Dose-effect Mode Trend Test for SNP Genotype Tables, Genetic Epidemiology vol.33, p.114~127
Counter line of statistics
Association test with df=2
But, by reducing the degrees of a vectorand showing a diagram,We can calculate p values computaionally.
Thank you for listening.