Statistical Calculators › Means: Many Groups (ANOVA) › Analysis of Covariance (ANCOVA) Sample Size
← All Calculators

Means: Many Groups (ANOVA)

Analysis of Covariance (ANCOVA) Sample Size

Calculate the sample size required for a one-way ANCOVA F-test using the exact noncentral-F approach. Specify the anticipated group means, response standard deviation, number of covariates, and R-squared between the response and covariates. Runs entirely in your browser.

ANCOVA Design

Find the smallest total sample size that reaches the requested power. Group sizes may be equal or follow allocation ratios.
Enter one mean for each group, separated by commas. These are the means under H1 at which power is evaluated.
Enter one positive ratio per group. For equal allocation use 1, 1,... For a 2:1:1 design use 2, 1, 1.
this method formulation: σe2 = σ2(1 − R2); power is computed from a noncentral F distribution with df1 = G − 1 and df2 = N − G − p.

Sample Size Result

The calculator searches integer group sample sizes and returns the first design whose exact noncentral-F power meets the requested target.
Enter the design assumptions and click Calculate Sample Size.

Methodology

This calculator follows the current this method Analysis of Covariance (ANCOVA) procedure. it uses the Keppel formulation for ANCOVA power calculations and computes power from the noncentral F distribution. The model contains a categorical group factor and quantitative covariates, with the covariate slopes assumed to be equal across groups.

Adjusted residual variance

Let σ2 be the common response variance before adjustment for the covariates and let R2 be the coefficient of multiple determination between the response and the covariates. This calculator uses the residual variance

σe2 = σ2(1 − R2)

Thus, increasing the anticipated R2 reduces the residual variance and increases the power available for detecting the specified group means.

Variation among the hypothesized group means

If the group sample sizes are n1,.., nG and N = Σni, the weighted mean is

μ̄ = Σ (ni/N)μi
σm2 = Σ (ni/N)(μi − μ̄)2

The noncentrality parameter used by the this method formulation is

λ = N σm2 / σe2

Noncentral-F power calculation

For G groups and p covariates, the numerator and denominator degrees of freedom are G − 1 and N − G − p, respectively. The critical value is the upper 1 − α quantile of the corresponding central F distribution. Power is the probability that a noncentral F random variable with the same degrees of freedom and noncentrality parameter λ exceeds that critical value.

df1 = G − 1
df2 = N − G − p
Power = P(Fnoncentral > F1−α; df1,df2 | λ)

Sample-size search

Because the sample size is an integer, the calculator evaluates candidate designs sequentially and returns the first design whose computed power is at least the requested target. With equal allocation, the group sample sizes are constrained to be equal. With allocation ratios supplied, integer group sizes are constructed to follow those ratios as closely as possible.

Validation example

This worked example: two groups; means 0 and 0.6; SD = 1.2; one covariate; R2 = 0.25; α = 0.05; target power = 0.80; equal allocation. The exact noncentral-F calculation gives N = 98, or 49 subjects per group, with achieved power approximately 0.80752. this method explicitly notes that its exact calculation gives N = 98, whereas the normal approximation in Borm et al. (2007) gives N = 95.

The implementation below was independently checked against that this method example: with N = 98, σm = 0.3, σe = 1.03923, and the resulting noncentral-F power is approximately 0.80752.

References

the software / this method. Analysis of Covariance (ANCOVA). this method Sample Size Software, Chapter 591. The documentation identifies the Keppel formulation as the method used by this method and describes the exact noncentral-F power calculation.

Keppel, G. (1991). Design and Analysis: A Researcher's Handbook. 3rd ed. Prentice Hall, Englewood Cliffs, NJ, pp. 323–324.

Borm, G. F., Fransen, J., & Lemmens, W. A. J. G. (2007). A simple sample size formula for analysis of covariance in randomized clinical trials. Journal of Clinical Epidemiology, 60(12), 1234–1238. DOI: 10.1016/j.jclinepi.2007.02.006.

Official the relevant methodological literature: Analysis of Covariance (ANCOVA), the software/this method

Published Borm et al. article: PubMed record