GAgreement · Guide test 308
Intraclass correlation F test
Tests a specified reliability hypothesis within a particular ANOVA based intraclass correlation model.
Do it in CodeSplash
In the app, set it up in Analyze with this method:
- Intraclass correlation (ICC) — How consistently do raters (or repeated measurements) score the same subjects?
Do it in CodeSplash Run this test on your own data, in Python or R.
Bench
Change the design, drag the data, move α. The statistic, its reference distribution and the verdict follow.
Bench · Intraclass correlation F test
Your data
Drag a point or use ↑/↓ to change itIf H₀ were true
- The reference: how F varies across samples when H₀ is true.
- Your statistic, from the data above.
- The p-value: the area at least as extreme as yours (p = < .001).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The formula
With your numbers
- between-subject mean square (blocks = subjects)
- residual mean square
- raters
The verdict
F(14, 28) = 5.51, p < .001, ICC = 0.60
p ≤ α = .050: reject H₀
Effect size: ICC(3,1), consistency ICC = 0.600
Tests ICC = 0, a low bar; what matters is the ICC and its interval. Here subjects are the blocks and raters the conditions. The bench shows ICC(3,1), the consistency form. CodeSplash's default is absolute agreement, ICC(A,1) = (MS_S − MS_E)/(MS_S + (k − 1)MS_E + k(MS_R − MS_E)/n), with MS_R the rater mean square; for H0: ICC = 0 both forms use this same F.
- Statistic
- 5.508
- p-value
- 0.0001
Intraclass correlation F test on Condition 1: n = 15; Condition 2: n = 15; Condition 3: n = 15: F(14, 28) = 5.51, p < .001, ICC = 0.60. The p-value is below α = .050, so the data are hard to reconcile with H₀.
Question and hypotheses
H0: an intraclass correlation has a specified value; the common simple test is ICC=0.
Assumptions
A clearly stated one/two-way, random/mixed, agreement/consistency and single/average-measure model; independent subjects and normal random effects for exact F forms.
Formula
Parameters and notation
Displayed balanced one-way random-effects ICC(1,1): n subjects,k ratings per subject. Other ICC models use different error mean squares and df.
Structure of the method
Decompose rating variation using the selected one-way or two-way ANOVA/random-effects model, form the corresponding variance-component ratio and use its model-specific F inference. The displayed one-way formula and the code’s two-way absolute-agreement example intentionally represent different ICC estimands and must be labeled accordingly.
Estimated and nuisance parameters
Estimate subject variability, residual variability and, for appropriate two-way models, rater and interaction/error components. Mean squares provide the balanced ANOVA estimates. The number of raters, single versus average measure and whether raters are random or fixed are design/estimand choices.
Settings and design choices
Prespecify one-way/two-way model, absolute agreement versus consistency, single/average rating unit, null reliability and confidence level. The irr test is one-sided for ICC greater than r0. Default listwise omission and an incomplete or unbalanced design can require a more suitable mixed-model analysis.
Fitting and adaptation
Fit the chosen variance-component model and report its full ICC designation. Adaptation means changing the measurement design or fitting/calibration method with explicit justification, not neural fine-tuning. Do not substitute the one-way denominator and degrees of freedom into the two-way agreement example.
Sensitivity and robustness
A significant positive ICC can still be too small for practical reliability. Between-subject heterogeneity influences ICC, so restricted or unusually diverse samples change interpretation. Normality, outliers and rater bias affect F inference. Report uncertainty and absolute measurement error, not only a favorable correlation-like coefficient.
How to use and calibrate
Use the model-specific F test or confidence interval; explicitly name the ICC estimand.
Example application
Assess whether repeated measurements share a meaningful subject component.
Interpretation and pitfalls
Watch out
A significant ICC above zero does not establish adequate reliability. Do not apply the one-way formula to a two-way agreement model.
What changed in edition 2
- New sections: structure of the method, estimated and nuisance parameters, settings and design choices, fitting and adaptation, sensitivity and robustness.
- Rewritten in the review: example application.
Example applicationsearch.r-project.org
Explicitly separate the illustrative one-way formula from the coded two-way agreement model.
Corrected text
Assess reliability under a prespecified ICC model. The displayed F formula is the balanced one-way random-effects ICC(1,1) case; the supplied code deliberately illustrates a two-way absolute-agreement, single-measure ICC and therefore uses its own model-specific F statistic and degrees of freedom.
Python and R
Two-way absolute-agreement, single-measure ICC. Consistency, average-measure and one-way ICCs are distinct estimands; document the chosen form.
Not run — Python launcher syntax checked; R backend runtime not verified · needs Python standard library + Rscript; R packages: irr
# Python launcher for the complete R implementation below.
# Requires Rscript on PATH and the listed R packages.
import shutil
import subprocess
rscript = shutil.which("Rscript")
if rscript is None:
raise RuntimeError("Install R and make Rscript available on PATH.")
r_code = r"""
set.seed(2026)
subject<-rnorm(30);ratings<-sapply(1:3,function(j)subject+rnorm(30,sd=.5));print(irr::icc(ratings,model="twoway",type="agreement",unit="single"))
"""
# No shell interpolation. A failed R execution raises an error in Python.
result = subprocess.run([rscript, "--vanilla", "-"], input=r_code,
text=True, capture_output=True)
print(result.stdout)
if result.stderr:
print(result.stderr)
result.check_returncode()
Not run — Syntax checked; runtime not verified in the final environment · needs irr
set.seed(2026)
subject<-rnorm(30);ratings<-sapply(1:3,function(j)subject+rnorm(30,sd=.5));print(irr::icc(ratings,model="twoway",type="agreement",unit="single"))
Sources
- irr — irr · iccAuthor documentation/source reviewed: irr 0.85.search.r-project.org
- psych — psych · ICCAuthor documentation/source reviewed: psych 2.6.9.search.r-project.org
- iccsearch.r-project.org
- ICCsearch.r-project.org
- Statistics guide v4 (historical):
- Python: Python launcher syntax checked; R backend runtime not verified · R: Syntax checked; runtime not verified in the final environment
- Reference's record:
- Edition 2 review: Python: skip · R: not executed (Rscript unavailable); why not run: Python: Python-to-R bridge; Rscript is unavailable. R code was not executed. Python: Not run in the reference's review: Python-to-R bridge; Rscript is unavailable. R code was not executed. R: Reviewed but not run: R wasn't available to the reference's authors.
From the CodeSplash statistics guide (v4), entry 308, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT308.