dot-power_count_joint_serial.RdEach simulated trial contains all arms and endpoints. Endpoint counts are
generated with their requested marginal Poisson or negative-binomial
distributions and a Gaussian-copula dependence structure. Every comparison
must pass at least k endpoints for the trial to count as a success.
.power_count_joint_serial(
n_per_arm,
rates,
comparisons,
exposure = 1,
margin_lower = 0.8,
margin_upper = 1.25,
model = c("poisson", "negative-binomial"),
dispersion = 0.1,
alpha = 0.05,
endpoint_corr = NULL,
k = NULL,
type_y = NULL,
adjust = c("none", "bonferroni", "sidak", "t", "pc", "partial-conjunction",
"partial_conjunction", "sequential"),
nsim = 5000,
seed = NULL,
design = c("parallel"),
list_margin_lower = NULL,
list_margin_upper = NULL,
type_y_active = FALSE
)Subjects in each arm. This joint implementation supports parallel-group designs.
Named list of equal-length endpoint-rate vectors, one per arm.
Named list of length-two character vectors. The first arm is the test arm and the second is the reference arm.
Exposure per subject, scalar or one value per endpoint, or a named list with one scalar/vector per arm.
Lower rate-ratio equivalence margin.
Upper rate-ratio equivalence margin.
Count model: "poisson" or "negative-binomial".
Positive negative-binomial dispersion parameter, scalar or a named list with one scalar/vector per arm.
One-sided significance level, scalar or one value per endpoint.
Positive-definite latent Gaussian correlation matrix across endpoints. The default is independence.
Number of endpoints that must pass within every comparison.
Numeric endpoint hierarchy used with adjust = "seq": 1
for primary/co-primary endpoints and 2 for secondary endpoints.
Multiplicity adjustment within each comparison's selected
endpoint family: "none", "bonferroni", "sidak", "t", or
"seq"/"sequential". The "t" option uses Mielke's strong
k-out-of-m calibration alpha / (m - k + 1); legacy partial-conjunction
labels are accepted. Sequential testing uses the primary gate and
secondary-family rule used by the continuous kernels.
When all supplied endpoints are required (k equals the endpoint count),
endpoint-wise adjustment is not necessary for the intersection-union
decision; a requested adjustment remains available with a warning.
Number of simulated trials.
Optional random seed.
Joint multi-arm design; currently only "parallel" is
supported because multiple reference arms do not define a single standard
2x2 crossover design.
Optional named list of lower margins, one vector per comparison. Each vector is scalar or has one value per endpoint.
Optional named list of upper margins, one vector per comparison. Each vector is scalar or has one value per endpoint.
Internal flag indicating whether type_y is active.
An object of class countpower containing joint power and a
binomial confidence interval.
rates <- list(TEST = c(.20, .20), REF = c(.20, .20), ALT = c(.20, .20))
SimTOST:::power_count_joint(100, rates, list(REF = c("TEST", "REF"),
ALT = c("TEST", "ALT")), nsim = 100, seed = 1)
#> Count-rate equivalence power
#> Model: poisson
#> Design: parallel
#> Subjects per arm: 100
#> Endpoints: 2 (required: 2 )
#> Alpha adjustment: none
#> Power: 0.0000 [0.0000, 0.0461]