Ch.4 One-way classification: Random effects model
(One-way ANOVA: Random factor effects model)
1
1.1
Assumptions and model
Random cell means model
Yij = µi + εij ,
i = 1, . . . , r, j = 1, . . . , ni
µ1 , . . . , µr are independent N (µ· , σµ2 );
Error terms εij ,
i = 1, . . . , r, j = 1, . . . , ni , are independent N (0, σ 2 );
{µk ,
k = 1, . . . , r} and {εij ,
i = 1, . . . , r, j = 1, . . . , ni } are independent
Important features of model
1◦ The response variable Yij is normally distributed with
EYij
= µ· ,
V ar(Yij ) = σµ2 + σ 2 .
2◦ Unlike for the fixed factor levels model where all observations Yij are independent, the Yij
for the random factor levels model are only independent if they pertain to different factor
levels.
2
2
σµ + σ ,
Cov(Yij , Yi0 j 0 ) =
σµ2 ,
0,
1
i = i0 , j = j 0 ,
i = i0 , j 6= j 0 ,
i 6= i0 .
STAT764, Fall 2015
1.2
Ch.4
One-way classification: Random effects model
Questions of interest
1◦
About σµ2 :
Point estimation of σµ2 ;
Interval estimation of σµ2 ;
Test whether σµ2 = 0;
Estimation of
2◦
2
σµ
2 +σ 2 ,
σµ
(σµ2 = 0 implies that all µi are equal, i.e., µi ≡ µ· )
which is the correlation coefficient between two observations Yij
and Yij 0 from the same factor level.
About µ· :
Point estimation;
Interval estimation.
1.3
Notations
nT
,
r
X
ni
(The total number of cases in the study)
i=1
Ȳi·
Ȳ··
SSB
SSW
SST
,
,
,
,
,
ni
1 X
Yij
ni
1
nT
j=1
ni
r X
X
r
X
(Sample mean of the i-th factor level)
Yij =
i=1 j=1
r
1 X
ni Ȳi·
nT
i=1
2
ni (Ȳi· − Ȳ·· )
i=1
ni
r X
X
i=1 j=1
ni
r X
X
(The overall mean for all responses)
(Sum of squares “between groups” (Treatment sum of squares))
2
(Sum of squares “within groups” (Error sum of squares))
2
( Total sum of squares)
(Yij − Ȳi· )
(Yij − Ȳ·· )
i=1 j=1
Breakdown of degrees of freedom
SST
|{z}
(nT −1 degrees of freedom)
=
SSW
|{z}
(nT −r degree of freedom)
+
SSB
|{z}
(r −1 degrees of freedom)
2
STAT764, Fall 2015
Ch.4
One-way classification: Random effects model
3
Inference on σ 2
2
2.1
Test whether σµ2 = 0
H0 : σµ2 = 0 ←→ Ha : σµ2 > 0
If H0 then all µi are equal.
•
One-way ANOVA Table (for the balanced case)
Source
of Variation
Between
treatments
Error or Residuals
df
Sum of Squares
(SS)
r−1
SSB
r(n − 1)
SSW
rn − 1
SST
F ∗ -value
Mean Square
(MS)
M SB =
M SW =
SSB
r−1
F∗ =
Pr(> F ∗ )
(p-value)
M SB
M SW
SSW
r(n−1)
(within treatments)
Total
•
Derivation
SSW
SSB
,
,
=
r X
n
X
i=1 j=1
r
X
2
(Yij − Ȳi· ) =
2
n(Ȳi· − Ȳ·· ) =
i=1
r
X
r X
n
X
i=1 j=1
r
n
X n X
n
i=1
1
n
2
n
r
n
XX
1X
(µi + εij )} =
{εij − ε̄i· }2
{µi + εij −
n
j=1
j=1
(µi + εij ) −
1
rn
i=1 j=1
r X
n
X
o2
(µi + εij )
i=1 j=1
n
o2
n (µi − µ̄· ) + (ε̄i· − ε̄·· )
i=1
SSW and SSB are independent,
Under H0 ,
F∗ =
SSW
∼ χ2r(n−1) ,
σ2
M SB
∼ Fr−1,r(n−1)
M SW
SSB
∼ χ2r−1 .
σ 2 + nσµ2
STAT764, Fall 2015
Ch.4
One-way classification: Random effects model
Apex Enterprises Example, page 964.
Set up the data frame, as in the fixed factor levels case.
> y <- read.table("CH24TA01.DAT")
> y
V1 V2 V3
1 76 1 1
......
20 79 5 4
>
>
>
data <- y[,1]
officer <- factor(rep(LETTERS[1:5],c(4,4,4,4,4)))
candidate.df <- data.frame(officer,data)
Look at the data set graphically.
> plot(officer,data)
> plot(candidate.df)
The ANOVA table is obtained by
> summary(aov(data~officer,candidate.df))
Df
Sum Sq
Mean Sq F value
officer
4
1579.70 394.93
5.389
Residuals
15 1099.25
73.28
What’s your conclusion?
Pr(>F)
0.006803
4
STAT764, Fall 2015
One-way classification: Random effects model
Estimation of σµ2
2.2
•
Ch.4
An unbiased estimator of σµ2 :
σ̂µ2 ,
M SW − M SB
n
Occasionally, σ̂µ2 < 0.
It is not possible to construct an exact CI for σµ2 .
•
2.3
2
σµ
2 +σ 2
σµ
Confidence interval for
A pivotal quantity
M SW /(σµ2 + σ 2 )
M SB /σ 2
The probability statement for
∼ Fr−1,r(n−1)
2
σµ
2 +σ 2 :
σµ
P
L
σµ2
U ≤ 2
≤
= 1 − α,
1+L
σµ + σ 2
1+U
where
L =
U
=
i
1
1 h M SW −1 ,
n M SB qf (1 − α/2; r − 1, r(n − 1))
i
1 h M SW 1
−1 .
n M SB qf (α/2; r − 1, r(n − 1))
Question: Is it possible to obtain L < 0? What are you going to do in such a case?
3
Inference on µ·
• An unbiased estimator of µ· :
µ̂· , Ȳ··
•
nσµ2 + σ 2 ∼ N µ· ,
.
rn
A pivotal quantity
Ȳ·· − µ·
∼ tr−1
M SW /rn
The 1 − α CI for µ·
Ȳ·· ± qt(1 − α/2; r − 1)
M SW
rn
5
© Copyright 2026 Paperzz