Hướng dẫn phân tích ANOVA
1 Nested ANOVA model
Khảo sát khả năng phát triển của muỗi bằng cách chọn ngẫu nhiên 3 chuồng nuôi (Cage I, II và III) và thả vào mỗi chuồng 4 con muỗi (EU là experiment unit là 4 cho mỗi nghiệm thức). Mỗi con muỗi được đo hai lần (n = 2 lần lặp lại) ở một chỉ tiêu theo dõi nào đó (ví dụ là khối lượng, tính bằng mg)1.
| Cage (random factor) | Cage I | Cage II | Cage III | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Mosquito (random factor nested within Cage) |
1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 |
| For each mosquitoes, we have two measurement units (subsampling) |
58.5 | 77.8 | 84.0 | 70.1 | 69.8 | 56.0 | 50.7 | 63.8 | 56.6 | 77.8 | 69.9 | 62.1 |
| 59.5 | 80.9 | 83.6 | 68.3 | 69.8 | 54.5 | 49.3 | 65.8 | 57.5 | 79.2 | 69.2 | 64.5 | |
| $$\Large{ \bar{Y}_{ij.} }$$ | 59.00 | 79.35 | 83.80 | 69.20 | 69.80 | 55.25 | 50.00 | 64.80 | 57.05 | 78.50 | 69.55 | 63.30 |
| $$\Large{ \bar{Y}_{i..} }$$ | 72.84 | 59.96 | 67.10 | |||||||||
| $$\Large{ \bar{Y}_{...} }$$ | 66.63 | |||||||||||
Do vậy đây là kiểu bố trí thí nghiệm CRD 2 yếu tố với Cage là random factor, Mosquito là random factor nested in Cage.
\[Y_{ijk} = \mu + \alpha_i + \beta_{ij} + \epsilon_{ijk}\]
- \(\mu\) = overall mean
- \(\alpha_i\) = effect for \(i^{th}\) của cage
- \(\beta_{ij}\) = effect for \(j^{th}\) mosquito within \(i^{th}\) cage
- \(\epsilon_{ijk}\) = random error
Nếu phân tích theo Random effects model với B nested trong A thì:
\(\alpha_i \sim N(0, \sigma_A^2)\) (Yếu tố A là Cage lúc này là random)
\(\beta_{ij} \sim N(0, \sigma_{B(A)}^2)\) (Yếu tố B là Mosquito lúc này là random và nested trong A)
\(\epsilon_{ijk} \sim N(0, \sigma_{e}^2)\)
Nếu phân tích theo Mixed effects model với B nested trong A thì:
\(\alpha_i\) fixed nên \(\sum{\alpha_i = 0}\) (Yếu tố A là Cage lúc này là fixed)
\(\beta_{ij} \sim N(0, \sigma_{B(A)}^2)\) (Yếu tố B là Mosquito lúc này là random và nested trong A)
\(\epsilon_{ijk} \sim N(0, \sigma_{e}^2)\)
Bảng ANOVA trong trường hợp Random effects model với B nested trong A
Ta có \(a = 3\) là random level của yếu tố Cage (nuôi muỗi trong 3 chuồng ngẫu nhiên), \(b = 4\) là random level của yếu tố Mosquito (4 con muỗi trong mỗi chuồng), vì điều kiện mỗi chuồng có thể không đồng nhất nên Mosquito coi như là nested within Cage, \(n = 2\) mỗi con muỗi đo lặp lại 2 lần.
| Source | Degrees of freedom df |
Sum of squares SS |
Mean squares MS |
F-value | Expected mean squares EMS |
|---|---|---|---|---|---|
| Among groups A |
$$a - 1$$ | $$SS_{A} = b \times n \times \sum\nolimits_i{ ( \bar{Y}_{i..} - \bar{Y}_{...} )^2 }$$ | $$MS_A = \frac{SS_A}{a-1}$$ | $$\frac{MS_A}{MS_{B(A)}}$$ | $$\sigma_e^2 + n \times \sigma_{B(A)}^2 + n \times b \times \sigma_A^2$$ |
| Subgroups within groups B(A) |
$$a \times (b-1)$$ | $$SS_{B(A)} = n \times \sum\nolimits_i\sum\nolimits_j{ ( \bar{Y}_{ij.} - \bar{Y}_{i..} )^2 }$$ | $$MS_{B(A)} = \frac{SS_{B(A)}}{a \times (b -1)}$$ | $$\frac{MS_{B(A)}}{MS_e}$$ | $$\sigma_e^2 + n \times \sigma_{B(A)}^2$$ |
| Within subgroups Error |
$$a \times b \times (n - 1)$$ | $$SS_{e} = \sum\nolimits_i\sum\nolimits_j\sum\nolimits_k{ ( \bar{Y}_{ijk} - \bar{Y}_{ij.} )^2 }$$ | $$MS_{e} = \frac{SS_e}{a \times b \times (n - 1)}$$ | $$\sigma_e^2$$ | |
| TOTAL | $$a \times b \times n -1$$ | $$SS_{TOTAL} = \sum\nolimits_i\sum\nolimits_j\sum\nolimits_k{ ( \bar{Y}_{ijk} - \bar{Y}_{...} )^2 }$$ |
Tính variance components:
Within groups (error/variance between measurements on each mosquito):
- \(\sigma_e^2 \simeq s_e^2 = MS_e\)
Among subgroups within groups (variance between mosquitoes within cages):
- \(\sigma_{B(A)}^2 \simeq s_{B(A)}^2 = \frac{MS_{B(A)} - MS_e}{n}\)
Among groups (variance ammong cages):
- \(\sigma_A^2 \simeq s_A^2 = \frac{MS_A - MS_{B(A)}}{n \times b}\)
Ta có:
Phương sai của \(Y\) xét trên tổng thể giá trị đo lường \(a \times b \times n = 3 \times 4 \times 2 = 24\)
- \(Var(Y) = \sigma_e^2 + \sigma_{B(A)}^2 + \sigma_A^2\)
Phương sai của \(Y\) ở từng chuồng
- \(Var(Y|A) = \sigma_e^2 + \sigma_{B(A)}^2\)
Phương sai của \(Y\) ở từng chuồng và trên từng con muỗi
- \(Var(Y|A, B) = \sigma_e^2\)