Linear Model
Yijkl = μ + αj + γl + αγjl + πi(jl) + βk + αβjk + βγkl + αβγjkl + βπki(jl) + εijkl
Let's break the linear model into chunks with an error term at the end of each line.
Yijkl = μ + αj
+ γl + αγjl
+ πi(jl) [between subjects]
+ βk + αβjk
+ βγkl + αβγjkl
+ βπki(jl) + εijkl [within subjects]
Schematic
b1 | b2 | b3 | b4 | |
a1c1 | S1 | S1 | S1 | S1 |
a1c2 | S2 | S2 | S2 | S2 |
a2c1 | S3 | S3 | S3 | S3 |
a2c2 | S4 | S4 | S4 | S4 |
ANOVA Summary Table (A, B, C fixed)
Source | Error Term | |
Between Blocks | ||
1 | A | [4] |
2 | C | [4] |
3 | A#C | [4] |
4 | Blks(A#C) | |
Within Blocks | ||
5 | B | [9] |
6 | A#B | [9] |
7 | B#C | [9] |
8 | A#B#C | [9] |
9 | B#Blks(A#C) | |
Total |
Stata Command
anova y a c a#c / s|a#c b a#b b#c a#b#c /, repeated(b)
SPF-p.qr
Linear Model
Yijkl = μ + αj + πi(j) + βk + αβjk + βπki(j) + γl + αγjl + γπli(j) + βγkl + αβγjkl + βγπkli(j) + εijkl
Again, let's break it into chunks with an error term at the end of each line.
Yijkl = μ + αj
+ πi(j) [between subjects]
+ βk + αβjk + βπki(j) [within subjects - B]
+ γl + αγjl + γπli(j) [within subjects - C]
+ βγkl + αβγjkl
+ βγπkli(j) + εijkl [within subjects - B#C]
Schematic
b1 c1 | b1 c2 | b2 c1 | b2 c2 | |
a1 | S1 | S1 | S1 | S1 |
a2 | S2 | S2 | S2 | S2 |
ANOVA Summary Table (A, B, C fixed)
Source | Error Term | |
Between Blocks | ||
1 | A | [2] |
2 | Blks(A) | |
Within Blocks | ||
3 | B | [5] |
4 | A#B | [5] |
5 | B#Blks(A) | |
6 | C | [8] |
7 | A#C | [8] |
8 | C#Blks(A) | |
9 | B#C | [11] |
10 | A#B#C | [11] |
11 | B#C#Blks(A) | |
Total |
Stata Command
anova y a / s|a b a#b / b#s|a c a#c / c#s|a b#c a#b#c /, repeated(b c)
SPF-pr.qt
Linear Model
There are so many terms in this linear model that we will break it up into chunks from the start.
Yijkl = μ + αj
+ γl + αγjl + πi(jl)
[between subjects]
+ βk + αβjk
+ βγkl + αβγjkl
+ βπki(jl) [within subjects - B]
+ δm + αδjm
+ γδlm + αγδjlm
+ δπmi(jl) [within subjects - D]
+ βδkm + αβδjkm
+ βγδklm + αβγδjklm
+ βδπkmi(jl) + εijklm [within subjects - B#D]
Schematic
b1 d1 | b1 d2 | b2 d1 | b2 d2 | |
a1c1 | S1 | S1 | S1 | S1 |
a1c2 | S2 | S2 | S2 | S2 |
a2c1 | S3 | S3 | S3 | S3 |
a2c2 | S4 | S4 | S4 | S4 |
ANOVA Summary Table (A, B, C, D fixed)
Source | Error Term | |
Between Blocks | ||
1 | A | [4] |
2 | C | [4] |
3 | A#C | [4] |
4 | Blks(A#C) | |
Within Blocks | ||
5 | B | [9] |
6 | A#B | [9] |
7 | B#C | [9] |
8 | A#B#C | [9] |
9 | B#Blks(A#C) | |
10 | D | [14] |
11 | A#D | [14] |
12 | C#D | [14] |
13 | A#C#D | [14] |
14 | D#Blks(A#C) | |
15 | B#D | [19] |
16 | A#B#D | [19] |
17 | B#C#D | [19] |
18 | A#B#C#D | [19] |
19 | B#D#Blks(A#C) | |
Total |
Stata Command
anova y a c a#c / s|a#c b a#b c#b a#b#c / b#s|a#c d a#d c#d a#c#d / d#s|a#c
b#d a#b#d c#b#d a#b#c#d /, repeated(b d)
Linear Statistical Models Course
Phil Ender, 17sep10, 12Feb98