Simulates a two-sequence, two-period (2x2) crossover design and evaluate equivalence for the ratio of means (ROM).

test_2x2_rom(
  n,
  muT,
  muR,
  SigmaW,
  lequi_tol,
  uequi_tol,
  alpha,
  sigmaB,
  dropout,
  Eper,
  Eco,
  typey,
  adseq,
  k,
  arm_seed
)

Arguments

n

integer number of subjects per sequence

muT

vector mean of endpoints on treatment arm

muR

vector mean of endpoints on reference arm

SigmaW

matrix within subject covar-variance matrix 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

sigmaB

double between subject variance (assumed same for all endpoints)

dropout

vector of size 2 with dropout proportion per sequence (0,1)

Eper

vector of size 2 with period effect on period (0,1)

Eco

vector of size 2 with carry over effect of arm c(Reference, Treatment).

typey

vector with positions of primary endpoints

adseq

boolean is used a sequential adjustment?

k

integer minimum number of equivalent endpoints

arm_seed

seed for the simulation

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.