- mu_list
Named list of arithmetic means per treatment arm. Each element is a vector representing expected outcomes for all endpoints in that arm.
- varcov_list
List of variance-covariance matrices, where each element corresponds to a comparator. Each matrix has dimensions: number of endpoints × number of endpoints.
- sigma_list
List of standard deviation vectors, where each element corresponds to a comparator and contains one standard deviation per endpoint.
- cor_mat
Matrix specifying the correlation structure between endpoints, used along with sigma_list
to calculate varcov_list
if not provided.
- sigmaB
Numeric. Between-subject variance for a 2×2 crossover design.
- Eper
Optional numeric vector of length 2 specifying the period effect in a dtype = "2x2"
design, applied as c(Period 0, Period 1)
. Defaults to c(0, 0)
. Ignored for dtype = "parallel"
.
- Eco
Optional numeric vector of length 2 specifying the carry-over effect per arm in a dtype = "2x2"
design, applied as c(Reference, Treatment)
. Defaults to c(0, 0)
. Ignored for dtype = "parallel"
.
- rho
Numeric. Correlation parameter applied uniformly across all endpoint pairs. Used with sigma_list
to compute varcov_list
when cor_mat
or varcov_list
are not provided.
- TAR
Numeric vector specifying treatment allocation rates per arm. The order must match arm_names
. Defaults to equal allocation across arms if not provided.
- arm_names
Optional character vector of treatment names. If not supplied, names are derived from mu_list
.
- ynames_list
Optional list of vectors specifying endpoint names per arm. If names are missing, arbitrary names are assigned based on order.
- type_y
Integer vector indicating endpoint types: 1
for co-primary endpoints, 2
for secondary endpoints.
- list_comparator
List of comparators. Each element is a vector of length 2 specifying the treatment names being compared.
- list_y_comparator
List of endpoint sets per comparator. Each element is a vector containing endpoint names to compare. If not provided, all endpoints common to both comparator arms are used.
- power
Numeric. Target power (default = 0.8).
- alpha
Numeric. Significance level (default = 0.05).
- lequi.tol
Numeric. Lower equivalence bounds (e.g., -0.5) applied uniformly across all endpoints and comparators.
- uequi.tol
Numeric. Upper equivalence bounds (e.g., 0.5) applied uniformly across all endpoints and comparators.
- list_lequi.tol
List of numeric vectors specifying lower equivalence bounds per comparator.
- list_uequi.tol
List of numeric vectors specifying upper equivalence bounds per comparator.
- dtype
Character. Trial design: "parallel"
(default) for parallel-group or "2x2"
for crossover (only for 2-arm studies).
- ctype
Character. Hypothesis test type: "DOM"
(Difference of Means) or "ROM"
(Ratio of Means).
- vareq
Logical. Assumes equal variances across arms if TRUE
(default = FALSE
).
- lognorm
Logical. Whether data follows a log-normal distribution (TRUE
or FALSE
).
- k
Integer vector. Minimum number of successful endpoints required for global bioequivalence per comparator. Defaults to all endpoints per comparator.
- adjust
Character. Alpha adjustment method: "k"
(K-fold), "bon"
(Bonferroni), "sid"
(Sidak), "no"
(default, no adjustment), or "seq"
(sequential).
- dropout
Numeric vector specifying dropout proportion per arm.
- nsim
Integer. Number of simulated studies (default = 5000).
- seed
Integer. Seed for reproducibility.
- ncores
Integer. Number of processing cores for parallel computation. Defaults to 1
. Set to NA
for automatic detection (ncores - 1
).
- optimization_method
Character. Sample size optimization method: "fast"
(default, root-finding algorithm) or "step-by-step"
.
- lower
Integer. Minimum sample size for search range (default = 2).
- upper
Integer. Maximum sample size for search range (default = 500).
- step.power
Numeric. Initial step size for sample size search, defined as 2^step.power
. Used when optimization_method = "fast"
.
- step.up
Logical. If TRUE
(default), search increments upward from lower
; if FALSE
, decrements downward from upper
. Used when optimization_method = "fast"
.
- pos.side
Logical. If TRUE
, finds the smallest integer i
closest to the root such that f(i) > 0
. Used when optimization_method = "fast"
.
- maxiter
Integer. Maximum iterations allowed for sample size estimation (default = 1000). Used when optimization_method = "fast"
.
- verbose
Logical. If TRUE
, prints progress and messages during execution (default = FALSE
).