Correlations within subjects (ICC)
Correlations within subjects
- One-way ANOVA fails because it does not account for the correlation
of measurements within-person
- How highly correlated are measurements on the same person? Consider
subject
,
pill types
and
:
* This is a measure of
how large the subject effect is, in relation to the error term
Correlation within subjects
- Equality 1:
-
and
terms are assumed to be constant, so do not enter into covariance
calculation
- residuals
are assumed to be independent
- Equality 2:
- covariance with self is variance
Recall
is the term for individual in 2-way AOV. Now
,
will later be treated as a random variable
Correlation within subjects
Previous slide calculated covariance for numerator of
correlation. Now calculate variance for the denominator
()
- Difference is that the independent residuals do contribute to
- Variance is broken into componenets due to subject and
residual variance
Intraclass Correlation
The correlation between two treatments
and
across subjects
is:
Intuition behind correlations within subjects

Fecal Fat dataset
Variance of the subject averages (279.4) is increased by correlation
of measurements within individual.
Calculation of correlations within subjects (ICC)
What is your estimate of the variability due to subjects, from the
2-way ANOVA?
sum(residuals(fit2way)^2) / 15 / 4 #df=15, divided by 4 pilltypes
## [1] 26.74972
279.419 - 26.75 #var(SUBJECT_i)
## [1] 252.669
Residual variance is:
## [1] 106.9989
Calculation of correlations within subjects (ICC)
Finally calculate ICC:
This calculation will become easier when we learn to estimate
random coefficients in directly in the regression model.