power_Mielke: Power Calculation for Hypothesis Testing in Equivalence...

View source: R/sampleSize_Mielke.R

power_MielkeR Documentation

Power Calculation for Hypothesis Testing in Equivalence Trials

Description

Estimates the power of hypothesis testing in equivalence trials using the method described by Mielke et al. This approach accounts for multiple endpoints, correlation structures, and multiplicity adjustments.

Usage

power_Mielke(
  N,
  m,
  k,
  R,
  sigma,
  true.diff,
  equi.tol = log(1.25),
  design,
  alpha = 0.05,
  adjust = "no",
  nsim = 10000
)

Arguments

N

Integer specifying the number of subjects per sequence.

m

Integer specifying the number of endpoints.

k

Integer specifying the number of endpoints that must meet equivalence to consider the test successful.

R

Matrix specifying the correlation structure between endpoints. This should be an m x m matrix, e.g., generated using variance.const.corr().

sigma

Numeric specifying the standard deviation of endpoints. Can be a vector of length m (one per endpoint) or a single value. In a 2x2 crossover design, this represents within-subject variance. In a parallel-group design, it represents the treatment group standard deviation.

true.diff

Numeric specifying the assumed true difference between test and reference. Can be a vector of length m or a single value.

equi.tol

Numeric specifying the equivalence margins, with the interval defined as (-equi.tol, +equi.tol). Default is log(1.25).

design

Character specifying the study design. Options are "22co" for a 2x2 crossover design or "parallel" for a parallel-group design.

alpha

Numeric specifying the significance level. Default is 0.05.

adjust

Character specifying the method for multiplicity adjustment. Options include "no" for no adjustment, "bon" for Bonferroni correction, and "k" for k-adjustment.

nsim

Integer specifying the number of simulations to perform. Default is 10,000.

Value

A numeric value representing the estimated power based on the simulations.


SimTOST documentation built on April 3, 2025, 9:05 p.m.