Description : to simulate a 2x2 design and return the p-tost for 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

mat(vector) with ptost and other simulated statistics such as mean (mu) and standard deviation(std) per sequence (0,1)-endpoint