ANCOVA_contrast: Power Calculations for ANCOVA Contrasts

View source: R/ANCOVA_contrast.R

ANCOVA_contrastR Documentation

Power Calculations for ANCOVA Contrasts

Description

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

Usage

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)

Superpower documentation built on May 17, 2022, 5:08 p.m.