 
Oneway random effects ANOVA (Model II)
Worked example 1
No. adult T. decipiens from grey seals

Western Isles  Shetland  Orkneys  East Anglia  East Scotland

0 21 124 7 13 13 14 1 151 5 3
 8 29 2 17 0 0 7 5 0 5
 222 390 16 7 543 0 48 204
 0 0 7 0 0 4
 0 0 0 0 0 0 27 3 0 2 0 0 0 0 0

Our first worked example uses data from Young (1972) on the number of nematode parasites (Terranova decipiens) in grey seals from five colonies around the British coast.
In this case it is debatable whether a Model I or Model II ANOVA is most appropriate. This is because we don't know whether the researcher selected those specific colonies for comparison, or whether they were a random (more likely convenience) sample of the colonies available. The author used a fixed effects ANOVA on log transformed data, but (for the sake of this example) we will analyze it using random effects ANOVA. It is unclear exactly how the seals were sampled, but the researcher notes that an attempt was made to obtain a representative sample.

Draw boxplots
{Fig. 1a}
It is apparent just from looking at the numeric data that distributions are contagious, with a few seals having large numbers of parasites. A log transformation improves the situation for regions A to C  but does not help much for regions C and D.
Next we look at normal QQ plots both of the raw data and of the log transformed data for the five groups.
{Fig. 1b}
Groups A  C are (more or less) normalized by a log (Y+1) transformation but groups D and E remain very skewed.
 Check homogeneity of variances
Using
A Bartlett's test on the raw data demonstrates that the variances are highly heteroscedastic. But after a log transformation, we get a borderline nonsignificant value (P = 0.06518), so we can (very cautiously) accept that the variances of log transformed data are homogeneous. Note that Bartlett's is probably being too liberal here given the distributions are still skewed.
Carry out analysis of variance on log (Y + 1) transformed data
SS_{group
}  =
 26.8800^{2
}  +
 15.2504^{2
}  +
 31.8023^{2
}  +
 3.6889^{2
}  +
 5.8171^{2
}  −
 (83.4387)^{2
} 
     
11  10  8  6  15  50

 =
 80.6493

SS_{total
}  =
 307.5264
 −
 (83.4387)^{2
}  =
 168.2861


50

SS_{residual
}  =
 168.2861
 −
 80.6493
 =
 87.6368

Using
ANOVA table

Source of variation
 df
 SS
 MS
 F ratio
 P

Group
 4
 80.649
 20.162
 10.355
 < 0.001

Residual
 45
 87.637
 1.947



Total
 49
 168.287




Estimate variance components & ICC
Since sample sizes vary markedly between groups, we need to calculate n_{o} as an overall measure of sample size:
n_{o} = [1/4][50 − (546/50)] = 9.77
The added variance component is then calculated as below:
s_{A}^{2
}  =
 20.162 − 1.947
 =
 1.8644


9.77

The intraclass correlation coefficient (= percentage variation between groups) is then calculated as:
ICC
 = 100 × [
 1.8644
 ]
 =
 48.92%


1.947 + 1.8644



Worked example 2
ANOVA table

Source of variation
 df
 SS
 MS
 F ratio
 P

Cow
 9
 278.45
 30.939
 10.856
 < 0.001

Residual
 10
 28.5
 2.85



Total
 19
 306.95




The mean square residual (MS_{W}) is equal to 2.85. The within subject standard deviation is given by √MS_{W} = 1.688, the same as we obtained using the other computational formula.
The added variance component is calculated as below:
s_{A}^{2
}  =
 30.939 − 2.85
 =
 14.0445


2

The intraclass correlation coefficient (percentage variation between cows) is then calculated as:
ICC
 = 100 × [
 14.0445
 ]
 =
 83.13%


2.85 + 14.0445

This can also be expressed as a percentage measurement error of 16.87%.


