Power Analysis for Multilevel and Mixed-Effects Models

Statistics
Introduced by
Snijders & Bosker; Hox, Moerbeek & van de Schoot
Year
1993
Type
Sample-size planning for hierarchical designs

What does it do?

Multilevel power analysis is a sample-size planning procedure for hierarchical, clustered, or longitudinal designs, in which observations are nested within higher-level units such as students within schools or patients within clinics.

The multilevel modelling framework on which it rests is covered in the textbooks by Snijders and Bosker (2012) and by Hox, Moerbeek, and van de Schoot (2017). The procedure uses the intraclass correlation (ICC) and the design effect to adjust for clustering, so that both the number of clusters and the cluster size are checked against a target effect.

The intuition behind the method

People in the same group, such as pupils in one classroom or patients treated by one doctor, tend to respond more alike than people in different groups. Their responses are therefore not fully independent, and the data carry less information than the raw observation count suggests. Multilevel power analysis measures this loss with the design effect (DEFF), reduces the sample size accordingly, and asks whether the expected effect size, ICC, number of clusters, and cluster size together give an adequate chance of detecting a real effect. When the ICC is non-trivial, the standard error depends on the number of clusters J in both of its terms but on the cluster size m only in the within-cluster term. Adding clusters therefore usually gains more precision than adding observations within existing clusters, and the method weighs these two dimensions explicitly.

History

Snijders and Bosker (2012) and Hox, Moerbeek, and van de Schoot (2017) cover the multilevel modelling framework within which these calculations are made. Hox and colleagues describe that framework as covering both observed and latent variables in the same model and as including Bayesian estimation. The closed-form expressions on this page follow the standard two-level random-intercept treatment of clustering. Simulation-based tools, such as the R package simr, allow power to be estimated for mixed-effects models whose structure does not fit the closed-form approximations.

When to use it

Use multilevel power analysis when observations are nested or clustered: school-based interventions with pupils in classrooms, clinical studies with patients in hospitals or sites, repeated measures within persons, or surveys drawn with a cluster-sampled frame. Four inputs are needed before the calculation: a plausible ICC from a pilot study or from published work in the same field; the planned number of Level-2 units (clusters), J; the planned average cluster size, m; and the expected standardized effect size. The closed-form expressions on this page are written for a continuous outcome with a two-level random-intercept structure and a balanced design. For binary outcomes, unbalanced clusters, random slopes, cross-classified structures, or three or more levels, the closed-form expressions are approximate, and simulation is the better choice.

Limitations and considerations

  • The calculation depends on a prior ICC estimate; an inaccurate ICC carries directly into the power estimate.
  • The closed-form DEFF and standard-error expressions assume a simple two-level random-intercept model with a balanced design; more complex structures need simulation.
  • Under the closed-form standard error, J enters both terms and m enters only the within-cluster term, so power is usually more sensitive to J than to m. Recruiting additional clusters is also often the costlier choice in practice.
  • The closed-form power expression is one-sided, so it can overstate power for a two-sided test.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Includes the clustering structure that a standard flat power formula ignores, so the required sample size is not understated when observations share cluster-level variance.
  • Separates the roles of the number of clusters J and the cluster size m, which makes cost trade-offs between recruiting more clusters and measuring more units per cluster explicit.
  • The DEFF step gives a quick, transparent first estimate of the effective sample size before any simulation is run.

Applications

  • Planning cluster-randomized trials in education, public health, and organizational research.
  • Determining the number of schools, hospitals, or firms needed for a multi-site intervention study.
  • Sample-size calculations for longitudinal panel studies where individuals are measured repeatedly.
  • Power assessment for cross-national or multi-site survey studies with complex sampling frames.
  • Informing grant applications that require a justified sample size for hierarchically structured data.

How it works

How it works

1

The null hypothesis states that the fixed effect of interest (for example, a treatment coefficient) is zero at the population level. The alternative states that it is non-zero. The test is framed in terms of a standardized effect size delta on the outcome.

Formula
H_0:\ \delta = 0 \quad H_1:\ \delta \neq 0
2

The design effect DEFF = 1 + (m − 1) × ICC measures how much variance is shared within clusters, where m is the average cluster size and ICC is the intraclass correlation. Dividing the total sample size N by DEFF gives an effective sample size n_eff that is smaller than N whenever the ICC is positive and the clusters contain more than one observation. The expression SE(delta-hat) = sqrt(ICC / J + (1 − ICC) / (J × m)), where J is the number of clusters, is the sampling variance of a mean under a balanced two-level random-intercept model with total outcome variance scaled to one. It is not in general the standard error of a treatment coefficient. For a two-arm comparison, the standard error depends on whether treatment is assigned at the cluster or the individual level, and it requires a design-specific form that is not given on this page. Delta must then be expressed on the same standardized scale as the variance. For more complex random-effects structures, variance components from a pilot study or the literature are substituted into the calculation.

Formula
\mathrm{DEFF} = 1 + (m-1)\,\mathrm{ICC};\quad n_{\mathrm{eff}} = \frac{N}{\mathrm{DEFF}};\quad \mathrm{SE}(\hat{\delta}) = \sqrt{\frac{\mathrm{ICC}}{J} + \frac{1-\mathrm{ICC}}{J\,m}}
3

The expression 1 − beta = Phi(|delta| / SE − z_{alpha/2}), where Phi is the standard normal CDF and z_{alpha/2} is the critical value for the chosen significance level, is a one-sided approximation. It contains only the term for one tail of the test statistic and omits the term for the opposite tail that a two-sided test adds. It therefore does not give the power of the two-sided test stated in the hypotheses, and it should not be reported as that power unless the omitted term is included or power is checked by simulation. When the design effect is large (high ICC or large clusters), a higher J is needed to keep power at the target level. Planning proceeds by fixing the significance level, the target power, m, the ICC, and the effect size in advance, and then finding the smallest J for which the expression reaches the target. The target power and significance level are conventions that the researcher must justify; the method does not fix them. If the analytical approximation is not adequate, Monte Carlo simulation (for example with the R package simr) estimates power directly from the full model.

Formula
1 - \beta = \Phi\!\left(\frac{|\delta|}{\mathrm{SE}(\hat{\delta})} - z_{\alpha/2}\right)

Common pitfalls

  • Applying a standard flat power formula without the design effect, which inflates the apparent effective sample size and leads to an underpowered study.
  • Assuming ICC is zero when it is unknown. Even a small ICC, such as 0.05, can reduce effective N substantially when clusters are large.
  • Treating the one-sided closed-form expression as the power of a two-sided test without noting the difference.
  • Adding observations within existing clusters and expecting power to grow in proportion, when the ICC is non-trivial and the extra observations share cluster-level variance.
  • Not reporting the assumed ICC and its source when publishing a power calculation.
  • Choosing the significance level or target power after seeing the results, rather than fixing them in advance and justifying them.

Frequently asked questions

Which matters more for power, the number of clusters or the cluster size?

The number of clusters J usually matters more. Under the closed-form standard error, J enters both terms, while m enters only the within-cluster term. Once the ICC is non-trivial, extra observations within an existing cluster reduce the standard error less than an extra cluster does. At a fixed total sample size, increasing J while reducing m lowers the standard error, because the ICC/J term falls while the (1 − ICC)/N term stays fixed. J is therefore the first design lever to examine.

What ICC value should I use if I have no pilot data?

Use published ICC estimates for the same field and outcome type where they exist, and treat the value as uncertain. Run the calculation over a range of plausible values, such as 0.05, 0.10, and 0.20, and report how sensitive the resulting sample size or power is to that range.

When should I use Monte Carlo simulation instead of the DEFF approximation?

The DEFF formula is suitable for a simple two-level random-intercept model with a balanced design. For random slopes, cross-classified structures, three or more levels, binary outcomes, or expected imbalance across clusters, simulation with a tool such as simr gives a more accurate estimate.

Does the method change for longitudinal data?

The logic is the same, with adjustments to the inputs. The ICC then describes the correlation between measurements on the same individual over time, and the number of time points takes the place of cluster size in the DEFF formula. Between-person and within-person variance should be estimated separately, from a pilot dataset or from published growth-curve studies.

Related methods

Sources

  1. Snijders, T.A.B. & Bosker, R.J. (2012). Multilevel Analysis: An Introduction to Basic and Advanced Multilevel Modeling (2nd ed.). SAGE.

    ISBN: 978-1849202015
  2. Hox, J.J., Moerbeek, M. & van de Schoot, R. (2017). Multilevel Analysis: Techniques and Applications (3rd ed.). Routledge.

    Open DOI reference