Complete power analyses for specific ANCOVA contrasts. This function does not support within subjects factors.

ANCOVA_contrast(
  cmat,
  mu,
  n = NULL,
  sd,
  r2 = NULL,
  n_cov,
  alpha_level = Superpower_options("alpha_level"),
  beta_level = NULL,
  round_up = TRUE
)

Arguments

cmat

Matrix of the specific contrasts of interest

mu

Vector specifying mean for each condition

n

Sample size in each condition

sd

Standard deviation for all conditions (or a vector specifying the sd for each condition)

r2

Coefficient of Determination of the model with only the covariates

n_cov

Number of covariates

alpha_level

Alpha level used to determine statistical significance

beta_level

Type II error probability (power/100-1)

round_up

Logical indicator (default = TRUE) for whether to round up sample size calculations to nearest whole number

Value

Object of class "power.htest", a list of the arguments (including the computed one) augmented with method and note elements.

References

Shieh, G. (2020). Power analysis and sample size planning in ANCOVA designs. Psychometrika, 85(1), 101-120.

Examples

ANCOVA_contrast(cmat = c(-1,1),
n = 15,
mu = c(0,1),
sd = 1,
r2 = .2,
n_cov = 1)
#> 
#>      Power Calculation for ANCOVA contrast 
#> 
#>             dfs = 1, 27
#>               N = 30
#>               n = 15, 15
#>           n_cov = 1
#>        contrast = -1, 1
#>              mu = 0, 1
#>              sd = 1
#>              r2 = 0.2
#>     alpha_level = 0.05
#>      beta_level = 0.1744293
#>           power = 82.55707
#>            type = Exact
#>