自由度

ここでは『カテゴリカルデータの連関モデル』では詳細に説明されていない,自由度の求め方を示す.

第2章 2元表の連関モデル

行変数は\(A\)カテゴリは\(i = 1,2,\dots,I\), 列変数は\(B\)でカテゴリは\(j = 1,2,\dots,J\).

式(2.4):\(O\)モデル

\[\begin{align} df &= \overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B}]\\ & = IJ - I - J + 1\\ & = (I - 1)(J - 1) \end{align}\]

式(2.6):\(FI\)モデル

\[\begin{align} df & = \overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B}+ \overbrace{(I - 1) \times (J - 1)}^{\lambda_{ij}^{AB}}]\\ &= IJ - IJ \\ & = 0 \end{align}\]

式(2.7):\(U\)モデル

\[\begin{align} df &=\overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{1}^{\beta}]\\ &= IJ - I - J \end{align}\]

式(2.9):\(R\)モデル

\[\begin{align} df &=\overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(I - 1)}^{\tau_i^A}]\\ &= IJ - 2I - J + 2\\ &= (I - 1)(J - 2) \end{align}\]

式(2.11):\(C\)モデル

\[\begin{align} df &=\overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(J - 1)}^{\tau_j^B}]\\ &= IJ - I - 2J + 2\\ &= (I - 2)(J - 1) \end{align}\]

式(2.13):\(R+C\)モデル

\[\begin{align} df &=\overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(I - 1)}^{\tau_i^A} + \overbrace{(J - 2)}^{\tau_j^B}] \\ &= IJ - 2I - 2J + 4\\ &= (I - 2)(J - 2) \end{align}\]

\[\begin{align} df &=\overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(I - 2)}^{\tau_i^A} + \overbrace{(J - 1)}^{\tau_j^B}] \\ &= IJ - 2I - 2J + 4\\ &= (I - 2)(J - 2) \end{align}\]

式(2.14):\(R+C\)モデル

\[\begin{align} df &=\overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{1}^{\beta} + \overbrace{(I - 2)}^{\tau_i^A} + \overbrace{(J - 2)}^{\tau_j^B}] \\ &= IJ - 2I - 2J + 4\\ &= (I - 2)(J - 2) \end{align}\]

式(2.14)で\(I=J\)について\(\tau_i^A=\tau_j^B\)の時

\[\begin{align} df &= \overbrace{I^2}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(I - 1)}^{\lambda_j^B} + \overbrace{1}^{\beta} + \overbrace{(I - 2)}^{\tau_i^A}]\\ &= I^2 - 3I + 2\\ &= (I - 1)(I - 2) \end{align}\]

式(2.16):\(RC\)モデル

\[\begin{align} df &= \overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{1}^{\phi} + \overbrace{(I - 2)}^{\mu_i} + \overbrace{(J - 2)}^{\nu_j}]\\ &= IJ - 2I -2J + 4 \\ &= (I - 2)(I - 2) \end{align}\]

式(2.20):\(U+RC\)モデル

\[\begin{align} df &=\overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{1}^{\phi_1} + \overbrace{1}^{\phi_2}+ \overbrace{(I - 2)}^{\mu_i} + \overbrace{(J - 2)}^{\nu_j}]\\ &= IJ - 2I - 2J + 3 \end{align}\]

式(2.22):\(R+RC\)モデル

\[\begin{align} df &=\overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(I - 2)}^{\tau_i^A} + \overbrace{1}^{\phi_1} + \overbrace{(I - 2)}^{\mu_i} + \overbrace{(J - 2)}^{\nu_j}]\\ &= IJ - 3I - 2J + 6\\ &= (I - 2)(J - 3) \end{align}\]

式(2.24):\(C+RC\)モデル

\[\begin{align} df &=\overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(J - 2)}^{\tau_j^B} + \overbrace{1}^{\phi_1} + \overbrace{(I - 2)}^{\mu_i} + \overbrace{(J - 2)}^{\nu_j}]\\ &= IJ - 2I - 3J + 6\\ &= (I - 3)(J - 2) \end{align}\]

式(2.26):\(R+C+RC\)モデル

\[\begin{align} df &= \overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(I - 3)}^{\tau_i^A} + \overbrace{(J - 2)}^{\tau_j^B}+ \overbrace{1}^{\phi_1} + \overbrace{(I - 2)}^{\mu_i} + \overbrace{(J - 2)}^{\nu_j}]\\ &= IJ - 3I - 3J + 9\\ &= (I - 3)(J - 3) \end{align}\]

\[\begin{align} df &= \overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(I - 2)}^{\tau_i^A} + \overbrace{(J - 3)}^{\tau_j^B}+ \overbrace{1}^{\phi_1} + \overbrace{(I - 2)}^{\mu_i} + \overbrace{(J - 2)}^{\nu_j}]\\ &= IJ - 3I - 3J + 9\\ &= (I - 3)(J - 3) \end{align}\]

式(2.28):\(RC(2)\)モデル

\[\begin{align} df &= \overbrace{IJ}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B}+ \overbrace{1}^{\phi_1} + \overbrace{(I - 2)}^{\mu_{i1}} + \overbrace{(J - 2)}^{\nu_{j1}} + \overbrace{1}^{\phi_2} + \overbrace{(I - 2)}^{\mu_{i2}} + \overbrace{(J - 2)}^{\nu_{j2}}- \overbrace{2}^{次元間制約}]\\ &= IJ - 3I - 3J + 9 \\ &= (I - 3)(J - 3) \end{align}\]

式(2.31):\(RC(M)\)モデル

次元間制約については\(M (M - 1)/2 \times 2 = M (M - 1)\)を引けばよい.\(M (M - 1)/2\)は次元の組み合わせであり,2は\(\mu\)\(\nu\)の2種類あるからである.

\[\begin{align} df &= \overbrace{IJ}^{セルの数} - \{\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + [\overbrace{M}^{\phi_m} + \overbrace{M(I - 2)}^{\mu_{im}} + \overbrace{M(J - 2)}^{\nu_{jm}} - \overbrace{M(M - 1)}^{次元間制約}] \} \\ &= IJ - I - J + 1 + 2M - MI - MJ + M^2 \\ & = I(J - M - 1) - J + 1 + 2M - MJ + M^2\\ & = I(J - M - 1) - M(J - M - 1) - (J - M - 1) \\ & = (I - M - 1)(J - M - 1) \end{align}\]

\(M = 2\)の時 \[\begin{align} df &= (I - M - 1)(J - M - 1)\\ &= (I - 2 - 1)(J - 2 - 1) \\ &= (I - 3)(J - 3) \end{align}\] となり,式(2.28)の\(RC(2)\)の自由度となる.

第3章 3元表に対する部分連関モデル

行変数は\(A\)カテゴリは\(i = 1,2,\dots,I\), 列変数は\(B\)でカテゴリは\(j = 1,2,\dots,J\), 列変数は\(C\)でカテゴリは\(k = 1,2,\dots,K\).

式(3.5):\(CI\)モデル

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(J - 1)}^{\lambda_{ij}^{AB}} + \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}}]\\ & = IJK - IJ - IK + I \\ & = I(JK - J - K + 1) \\ & = I(J - 1)(K - 1) \end{align}\]

式(3.7):\(CIA\)モデル

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C} \\ &\quad- \{\overbrace{M_1}^{\phi_r^{AB}} + \overbrace{M_1(I - 2)}^{\mu_{ir}} + \overbrace{M_1(J - 2)}^{\nu_{ir}} - \overbrace{M_1(M_1 - 1)}^{次元間制約} \} \\ &\quad - \{\overbrace{M_2}^{\phi_r^{AC}} + \overbrace{M_2(I - 2)}^{\mu^*_{ir}} + \overbrace{M_2(K - 2)}^{\eta_{kr}} - \overbrace{M_2(M_2 - 1)}^{次元間制約} \}] \\ &= IJK - I - J - K + 2 - M_1 (I + J - M_1 - 2) - M_2 (I + K - M_2 - 2) \end{align}\]

式(3.7)で\(M_1 = M_2 = 1\)の時

\[\begin{align} df &= IJK - I - J - K + 2 - M_1 (I + J - M_1 - 2) - M_2 (I + K - M_2 - 2)\\ & = IJK - I - J - K + 2 - (I + J - 1 - 2) - (I + K - 1 - 2)\\ & = IJK - 3I - 2J - 2K + 8 \end{align}\]

式(3.7)で\(M_1 = M_2 = 1\)かつ\(\mu_i = \mu^*_i\)の時

\[\begin{align} df &= IJK - I - J - K + 2 - M_1 (I + J - M_1 - 2) - M_2 (K - M_2)\\ & = IJK - I - J - K + 2 - (I + J - 1 - 2) - (K - 1)\\ & = IJK - 2I - 2J - 2K + 6 \end{align}\]

式(3.9)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(J - 1)}^{\lambda_{ij}^{AB}} + \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} ]\\ & = IJK + I + J + K - IJ - IK - JK - 1\\ & = I(JK - J - K + 1) - (JK - J - K + 1)\\ & = I(J - 1)(K - 1) - (J - 1)(K - 1)\\ & = (I - 1)(J - 1)(K - 1) \end{align}\]

式(3.10)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}\\ & \quad + \overbrace{1}^{\phi_{1}^{AB}} + \overbrace{(I - 2)}^{\mu_{i}} + \overbrace{(J - 2)}^{\nu_{j}} + \overbrace{1}^{\phi_{1}^{AC}} + \overbrace{(I - 2)}^{\mu_{i}} + \overbrace{(K - 2)}^{\eta_{j}} + \overbrace{1}^{\phi_{1}^{BC}} + \overbrace{(J - 2)}^{\nu_{j}} + \overbrace{(K - 2)}^{\eta_{k}} ] \\ & = IJK - I - J - K + 2 - [3 - 2(I - 2) -2(J-2) -2(K -2)]\\ & = IJK - 3I - 3J - 3K + 11 \end{align}\]

式(3.11)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}\\ & \quad + \overbrace{1}^{\phi_{1}^{AB}} + \overbrace{1}^{\phi_{1}^{AC}} + \overbrace{1}^{\phi_{1}^{BC}} + \overbrace{(I - 2)}^{\mu_{i}} + \overbrace{(J - 2)}^{\nu_{j}} + \overbrace{(K - 2)}^{\eta_{j}} + ] \\ & = IJK - I - J - K + 2 - [3 - (I - 2) -(J-2) - (K -2)]\\ & = IJK - 2I - 2J - 2K + 5 \end{align}\]

式(3.12)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}\\ & \quad + \overbrace{M_1}^{\phi_{m}^{AB}} + \overbrace{M_1(I - 2)}^{\mu_{im}} + \overbrace{M_1(J - 2)}^{\nu_{jm}} - \overbrace{M_1(M_1 - 1)}^{次元間制約} \\ & \quad + \overbrace{M_2}^{\phi_{m}^{AC}} + \overbrace{M_2(I - 2)}^{\mu^*_{im}} + \overbrace{M_2(K - 2)}^{\eta_{jm}} - \overbrace{M_2(M_2 - 1)}^{次元間制約} \\ & \quad + \overbrace{M_3}^{\phi_{m}^{BC}} + \overbrace{M_3(J - 2)}^{\nu^*_{jm}} + \overbrace{M_3(K - 2)}^{\eta^*_{km}} - \overbrace{M_3(M_3 - 1)}^{次元間制約}] \\ & = IJK - I - J - K + 2 - M_1(I + J - M_1 - 2) - M_2(I + K - M_2 - 2)- M_3(J + K - M_3 - 2) \end{align}\]

式(3.12)で\(M_1 = M_2 = M_3 = M\)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}\\ & \quad + \overbrace{M}^{\phi_{m}^{AB}} + \overbrace{M(I - 2)}^{\mu_{im}} + \overbrace{M(J - 2)}^{\nu_{jm}} - \overbrace{M(M - 1)}^{次元間制約} \\ & \quad + \overbrace{M}^{\phi_{m}^{AC}} + \overbrace{M(I - 2)}^{\mu^*_{im}} + \overbrace{M(K - 2)}^{\eta_{km}} - \overbrace{M(M - 1)}^{次元間制約} \\ & \quad + \overbrace{M}^{\phi_{m}^{BC}} + \overbrace{M(J - 2)}^{\nu^*_{jm}} + \overbrace{M(K - 2)}^{\eta^*_{km}} - \overbrace{M(M - 1)}^{次元間制約}] \\ & = IJK - I - J - K + 2 - M(I + J - M - 2) - M(I + J - M - 2)- M(I + J - M - 2) \\ & = IJK - I - J - K + 2 - M(2I + 2J + 2K - 3M - 6) \end{align}\]

式(3.12)で\(M_1 = M_2 = M_3 = M\)かつ一貫したスコア

必要な次元間制約は\(3M(M-1)/2\)ではなく\(M(M-1)/2\)である.

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}\\ & \quad + \overbrace{M}^{\phi_{m}^{AB}} + \overbrace{M}^{\phi_{m}^{AC}} + \overbrace{M}^{\phi_{m}^{BC}} + \overbrace{M(I - 2)}^{\mu_{im}} + \overbrace{M(J - 2)}^{\nu_{jm}} + \overbrace{M(K - 2)}^{\eta_{km}} - \overbrace{M(M - 1)/2}^{次元間制約}] \\ & = IJK - I - J - K + 2 - M(I + J + K - 3) + M(M - 1)/2 \end{align}\]

第4章:3元表に対する条件付き連関モデル

式(4.1):\(CI\)モデル

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}}]\\ & = IJK - IK - JK + K \\ & = (IJ - I - J + 1)K \\ & = (I - 1)(J - 1)K \end{align}\]

式(4.3):\(FI\)モデル

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C} \\ & \quad + \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} + \overbrace{(I - 1)(J - 1)}^{\lambda_{ij}^{AB}}]\\ & = IJK - IK - JK - IJ + I + J + K - 1 \\ & = I(JK - K - J + 1) - (JK - K - J + 1)\\ & = (I - 1)(JK - K - J + 1)\\ & = (I - 1)(J - 1 )(K- 1) \end{align}\]

式(4.5):飽和モデル

\(FI\)モデルの自由度\((I - 1)(J - 1 )(K- 1)\)を使い,そこから3元交互作用のパラメータ数\((I - 1)(J - 1 )(K- 1)\)を引く.

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C} \\ & \quad + \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} + \overbrace{(I - 1)(J - 1)}^{\lambda_{ij}^{AB}} + \overbrace{(I - 1)(J - 1)(K - 1)}^{\lambda_{ijk}^{ABC}} ] \\ & = (I - 1)(J - 1 )(K- 1) - (I - 1)(J - 1)(K - 1) \\ & = 0 \end{align}\]

式(4.6):\(LL_1\)

\(FI\)モデルの自由度\((I - 1)(J - 1 )(K- 1)\)を使い,そこから\((K - 1)\)を引く.

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C} \\ & \quad + \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} + \overbrace{(I - 1)(J - 1)}^{\lambda_{ij}^{AB}} + \overbrace{(K - 1)}^{\beta_k}]\\ & = (I - 1)(J - 1 )(K- 1) - (K - 1)\\ & = (IJ - I - J)(K- 1) \end{align}\]

式(4.10):\(LL_2\)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C} \\ & \quad + \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} + \overbrace{(K - 1)}^{\phi_{k}} + \overbrace{(I - 1)(J - 1)}^{\psi_{ij}}]\\ & = (I - 1)(J - 1 )(K- 1) - (K - 1) \\ & = (IJ - I - J)(K - 1) \end{align}\]

式(4.14):\(LL_3\)

\(\phi_{k}\)については\(\phi_{1} = 0\)\(\phi_{K} = 1\)とするなど2つの制約が必要である.

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C} \\ & \quad + \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} + \overbrace{(I - 1)(J - 1)}^{\lambda_{ij}^{AB}}]\\ & \quad + \overbrace{(K - 2)}^{\phi_{k}} + \overbrace{(I - 1)(J - 1)}^{\psi_{ij}}]\\ & = (I - 1)(J - 1)(K- 1) - (K - 2) - (I - 1)(J - 1) \\ & = (I - 1)(J - 1)(K- 2) - (K - 2) \\ & = (IJ - I - J)(K- 2) \end{align}\]

式(4.21):等質\((R+C)-L\)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} \\ & + \quad \overbrace{1}^{\phi} + \overbrace{(I-2)}^{\tau_i^A} + \overbrace{(J-2)}^{\tau_j^B}]\\ & = (I-1)(J-1)K - (I-2) - (J - 2) -1\\ & = IJK - IK - JK + K - I - J + 3\\ & = IJK - K(I + J - 1) - (I + J - 1) + 2\\ & = IJK - (K+1)(I + J - 1) + 2\\ \end{align}\]

式(4.24):異質\((R+C)-L\)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} \\ & + \quad \overbrace{K}^{\phi_k} + \overbrace{(I-2)K}^{\tau_{ik}^{AC}} + \overbrace{(J-2)K}^{\tau_{jk}^{BC}}]\\ & = (I-1)(J-1)K - (I-2)K - (J-2)K - K \end{align}\]

式(4.27):部分異質\((R+C)-L\)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} \\ & + \quad \overbrace{K}^{\phi_k} + \overbrace{(I-2)}^{\tau_{i}^{AC}} + \overbrace{(J-2)}^{\tau_{j}^{BC}}]\\ & = (I-1)(J-1)K - (I-2) - (J-2) - K\\ & = IJK - IK - JK - I - J + 4\\ & = IJK - (I + J)(K + 1) + 4 \end{align}\]

式(4.30):部分異質\((R+C)-L\)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} \\ & + \quad \overbrace{K}^{\phi_k} + \overbrace{(I-2)K}^{\tau_{ik}^{AC}} + \overbrace{(J-2)}^{\tau_{j}^{BC}}]\\ & = (I-1)(J-1)K - (I-2)K - (J-2) - K\\ & = IJK - IK - JK + K - IK + 2K - J + 2 - K\\ & = IJK - 2IK - JK + 2K - J + 2\\ & = J(IK - K - 1) - 2(IK - K - 1)\\ & = (J - 2)(IK - K - 1) \end{align}\]

式(4.31):部分異質\((R+C)-L\)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} \\ & + \quad \overbrace{K}^{\phi_k} + \overbrace{(I-2)}^{\tau_{i}^{AC}} + \overbrace{(J-2)K}^{\tau_{jk}^{BC}}]\\ & = (I-1)(J-1)K - (I-2) - (J-2)K - K\\ & = IJK - IK - JK + K - I + 2 - JK + 2K - K\\ & = IJK - IK - 2JK + 2K - I + 2\\ & = I(JK - K - 1) - 2(JK - K - 1)\\ & = (I - 2)(JK - K - 1) \end{align}\]

式(4.39):同質\(RC(M)-L\)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} \\ & + \quad \overbrace{M}^{\phi_m} + \overbrace{(I-2)M}^{\mu_{im}} + \overbrace{(J-2)M}^{\nu_{jm}} - \overbrace{M(M-1)}^{次元間制約}] \\ & = (I-1)(J-1)K - M(I + J - M - 2) \end{align}\]

式(4.42):異質\(RC(M)-L\)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} \\ & + \quad \overbrace{KM}^{\phi_{mk}} + \overbrace{(I-2)KM}^{\mu_{imk}} + \overbrace{(J-2)KM}^{\nu_{jmk}} - \overbrace{KM(M-1)}^{次元間制約}] \\ & = K(I-1)(J-1) - KM(I - 1) - KM(J - 1) - KM^2\\ & = K(I-1)[(J-1) - M] - KM[(J - 1) - M]\\ & = K(I - 1 - M)(J - 1 - M) \end{align}\]

式(4.45)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} \\ & + \quad \overbrace{K}^{\phi_k} + \overbrace{(I-2)}^{\mu_{i}} + \overbrace{(J-2)K}^{\mu_{jk}}]\\ & = IJK - IK - JK + K - K - I + 2 - JK + 2K\\ & = I(JK - K - 1) -2(JK - K - 1)\\ & = (I - 2)(JK - K - 1) \end{align}\]

式(4.48)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} \\ & + \quad \overbrace{K}^{\phi_k} + \overbrace{(I-2)K}^{\mu_{ik}} + \overbrace{(J-2)}^{\mu_{j}}]\\ & \quad = IJK - IK - JK + K - K - IK + 2K - J + 2\\ & \quad = J(IK - K - 1) -2(IK - K - 1)\\ & \quad = (J - 2)(IK - K - 1) \end{align}\]

式(4.51)

\[\begin{align} df &= \overbrace{IJK}^{セルの数} - [\overbrace{1}^{\lambda} + \overbrace{(I - 1)}^{\lambda_i^A} + \overbrace{(J - 1)}^{\lambda_j^B} + \overbrace{(K - 1)}^{\lambda_k^C}+ \overbrace{(I - 1)(K - 1)}^{\lambda_{ik}^{AC}} + \overbrace{(J - 1)(K - 1)}^{\lambda_{jk}^{BC}} \\ & + \quad \overbrace{K}^{\phi_k} + \overbrace{(I-2)}^{\mu_{i}} + \overbrace{(J-2)}^{\mu_{j}}]\\ & \quad = (IJK - IK - JK + K) - K - I + 2 - J + 2\\ & \quad = IJK - K(I + J) - (I + J) + 4\\ & \quad = IJK - (I + J)(K+1) + 4 \end{align}\]