Simulates a parallel-group design and performs equivalence testing using the ratio of means (ROM) approach. This function evaluates whether the treatment and reference groups are equivalent based on predefined equivalence margins and hypothesis testing criteria.

test_par_rom(
  n,
  muT,
  muR,
  SigmaT,
  SigmaR,
  lequi_tol,
  uequi_tol,
  alpha,
  dropout,
  typey,
  adseq,
  k,
  arm_seedT,
  arm_seedR,
  TART,
  TARR,
  vareq
)

Arguments

n

integer number of subjects per arm

muT

vector mean of endpoints on treatment arm

muR

vector mean of endpoints on reference arm

SigmaT

matrix covar-variance matrix on treatment arm across endpoints

SigmaR

matrix covar-variance matrix on reference arm across endpoints

lequi_tol

vector lower equivalence tolerance band across endpoints

uequi_tol

vector upper equivalence tolerance band across endpoints

alpha

vector alpha value across endpoints

dropout

vector of size 2 with dropout proportion per arm (T,R)

typey

vector with positions of primary endpoints

adseq

boolean is used a sequential adjustment?

k

integer minimum number of equivalent endpoints

arm_seedT

integer seed for the simulation on treatment arm

arm_seedR

integer seed for the simulation on reference arm

TART

double treatment allocation rate for the treatment arm

TARR

double treatment allocation rate for the reference arm

vareq

Boolean. If TRUE, assumes equal variance between arms and applies Schuirmann's two one-sided tests (TOST) for equivalence using a pooled variance.

Value

A numeric matrix containing the simulated hypothesis test results. The first column represents the overall equivalence decision, where 1 indicates success and 0 indicates failure. The subsequent columns contain the hypothesis test results for each endpoint, followed by mean estimates for the reference and treatment groups, and standard deviations for the reference and treatment groups.

Details

The function simulates a parallel-group study design and evaluates equivalence using the ratio of means (ROM) approach. It accounts for dropout rates and treatment allocation proportions while generating simulated data based on the specified covariance structure. The test statistics are computed, and a final equivalence decision is made based on the predefined number of required significant endpoints (k). If sequential testing (adseq) is enabled, primary endpoints must establish equivalence before secondary endpoints are evaluated. When vareq = TRUE, the test assumes equal variances between groups and applies Schuirmann's two one-sided tests (TOST).