Compute power of ANCOVA omnibus test (power_oneway_ancova) or contrast (power_oneway_ancova) for one-way (single factor), between subjects designs.

power_oneway_ancova(
  n = NULL,
  mu = NULL,
  n_cov = 1,
  r2 = NULL,
  sd = 1,
  alpha_level = Superpower_options("alpha_level"),
  beta_level = NULL,
  round_up = TRUE,
  type = "exact"
)

Arguments

n

Sample size in each condition.

mu

Vector specifying mean for each condition.

n_cov

Number of covariates.

r2

Coefficient of determination (r^2) of the combined covariates.

sd

Standard deviation for all conditions (residual SD without covariate adjustment).

alpha_level

Alpha level used to determine statistical significance.

beta_level

Type II error probability (power/100-1)

round_up

Logical indicator for whether to round up the sample size(s) to a whole number. Default is TRUE.

type

Sets the method for estimating power. "exact" will use the Shieh (2020) approach while "approx" will use the Keppel (1991) approach.

Value

dfs = degrees of freedom, N = Total sample size, n = Sample size per group/condition, n_cov = Number of covariates, mu = Mean for each condition, sd = Standard deviation, r2 = Coefficient of determination of combined covariates. alpha_level = Type 1 error probability, beta_level = Type 2 error probability, power = Power of test (1-beta_level\*100

type = Method (Shieh or Keppel) for estimating power

References

Keppel, G. (1991). Design and Analysis A Researcher's Handbook. 3rd Edition. Prentice Hall. Englewood Cliffs, New Jersey. See pages 323 - 324. Shieh, G. (2017). Power and sample size calculations for contrast analysis in ANCOVA. Multivariate behavioral research, 52(1), 1-11. Shieh, G. (2020). Power analysis and sample size planning in ANCOVA designs. Psychometrika, 85(1), 101-120.

Examples

# Example from Table 1 Shieh 2020
power_oneway_ancova(mu = c(400, 450, 500), n = c(21,21,21),
r2 = .1^2, sd = 100)
#> 
#>      Power Calculation for 1-way ANCOVA 
#> 
#>             dfs = 2, 59
#>               N = 63
#>               n = 21, 21, 21
#>           n_cov = 1
#>              mu = 400, 450, 500
#>              sd = 100
#>              r2 = 0.01
#>     alpha_level = 0.05
#>      beta_level = 0.1884542
#>           power = 81.15458
#>            type = exact
#>