Random Effect Models
Random Effect Models
Topic Overview
Random vs. Fixed Effects
Using Expected Mean Squares (EMS) to obtain
appropriate tests in a Random or Mixed Effects
Model
Fixed-effect:
i. All the levels of the factor are predetermined by the
experimenter.
ii. If we were to repeat the experiment we would select the
same levels.
iii. We will not extrapolate our statistical conclusions to
other treatments not included in the study.
1
Random-effect:
i. The levels of the factors in the experiment are randomly
selected from a population of all possible levels; or the
levels result from a process of a random nature.
ii. If we were repeating the experiment we would select
different levels.
iii. We will apply our statistical conclusions to all
treatments of the population from which our
experimental treatments were randomly selected.
Note: In some situations it is clear from the experiment
whether an effect is fixed or random. However there are
also situations in which calling an effect fixed or random
depends on your point of view, and on your interpretation
and understanding. It is therefore sometimes a personal
choice.
2
Example:
-A plant-breeder obtains 6 crosses between wild
strawberries and strawberry cultivars. These are a random
sample of all potential crosses that the breeder could obtain.
-Fruit weights are measured from 8 plants of each cross.
These 8 plants are a random sample of the progeny possible
from each cross.
The assumptions:
i. The random components ai and ij are independent
from each other
ii. The ij error effects are assumed to be a random
sample from a population with a mean of 0 and
common variance 2
iii. The ai (random effects for the group) values are
assumed to be a random sample from a population
that is normally distributed with a mean of 0 and
variance a2.
If a2 = 0, then all group effects are equal, but if a2 > 0
there is variability among the group effects. Since the
group effects in the experiment are only a sample from
a large population of effects, the difference among the
specific group means, μ +αi, are of no particular
interest. The variance of the distribution of the group
effects, a2 is the focus of interest with random effects.
4
The variance of a single observation (single fruit
weight), y2 may be expressed as the sum of the two
variancesa2 and 2 :
5
Treatment t–1 SST SST 2+ra2
MST =
t−1
Error tr-t=N-t SSE SSE 2
MSE=
tr−t
Total tr – 1=N-1 TSS
T
SSt=∑ r i ( ȳ i .− ȳ . .)2
i=1
T ni
SSE=∑ ∑ ij i
( y − ȳ .)2
i=1 j=1
The Anova also gives the formulae for computing the Expected
mean squares for treatment and error (variance components for
treatment and error).
6
Expected Mean Squares
The Analysis of variance method is used to estimate
the variance components. The analysis of variance is
computed as if the model is a fixed effects model,
Mean squares are computed by dividing a sum of
squares by respective df:
MS=SS/df,
σ +r i=1 μ̄ .= ∑ r i μ i
ε2 ( t −1) n i =1
7
t
∑ ( μi −μ̄ . )2
i=1
r
where ( t −1) characterizes the variance among
treatment means.
σ 2 +rσ
ε a2
where the component a2 is the variance among levels
of the random factor.
8
ANOVA table for random-effect model
Source of Degrees of Sum of Mean square Expected mean
variation freedom squares square
Treatment t–1 SST SST 2+ra2
MST =
t−1
Error tr-t=N-t SSE SSE 2
MSE=
tr−t
Total tr – 1=N-1 TSS
[ ]
r 2i σ 2a
t
Expected ( MST )=σ 2ε + N −∑
i=1 N t −1
- for unequal
replications
9
For the Example:
σ^ 2e=MSE
MST −MSE
σ^ 2a =
r
10
For unequal replications:
MST −MSE
σ^ 2a =
r0 , where
[ r 2i
]
t
1
r0= N −∑
t −1 i=1 N
σ^ 2e=MSE=0 . 085
11
Estimate the variance components in SAS –
PROC GLM
proc glm data=strawberry;
class genotype;
model fruit=genotype;
random genotype /test;
Random statement is used and /test will perform
appropriate tests (and produce EMS)
PROC MIXED
13
The random effects of the model are assumed to have
a normal distribution. Thus given the assumption of
normally distributed effects, the significance of the
treatment component of variance can be tested using
the hypothesis:
H0: a2 = 0
Ha: a2 > 0
F,df1,df2 = F,t-1,N-t
14
Interval Estimates for Variance Components
Intraclass correlation
^ 2y
σ
The variance of the response variable equal to
σ^ 2y =σ^ 2a + σ^ 2ε can be proportionally allocated to the two
source of variability: the treatment and the experimental
error
Intraclass correlation,
Treatment = σ^ 2a / σ^ 2y = 0.7376 I
16
F o −F α /2 ,( t−1) ,( N −t ) F o −F( 1−α /2 ), (t−1) ,( N −t)
<ρ I <
F o +(r−1) F α /2, (t−1) ,( N −t) F o +(r−1 )F (1−α /2) ,( t−1 ),( N−t)
17