sampleSize_count_joint.RdEstimate sample size for joint correlated count equivalence
sampleSize_count_joint(
power = 0.8,
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,
lower = 2,
upper = 500,
design = c("parallel"),
list_margin_lower = NULL,
list_margin_upper = NULL,
optimization_method = c("fast", "step-by-step"),
step.power = 6,
step.up = TRUE,
pos.side = FALSE,
maxiter = 1000,
ncores = 1,
.warn_redundant_bon = TRUE
)Target joint power.
Named list of equal-length endpoint-rate vectors, one per arm.
Named list of treatment-reference arm pairs.
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.
One-sided significance level.
Endpoint correlation matrix; 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 endpoint family.
Number of simulated trials.
Optional random seed.
Minimum subjects per arm.
Maximum subjects per arm.
Joint multi-arm design; currently only "parallel" is
supported.
Optional named list of lower margins, one vector per comparison.
Optional named list of upper margins, one vector per comparison.
Search method: "fast" uses bracketing and
integer bisection; "step-by-step" evaluates every candidate.
Initial power-of-two jump for the fast search.
Direction of the initial fast-search bracketing.
Retained for compatibility with sampleSize(); count
searches always return the smallest candidate reaching the target.
Maximum number of power evaluations.
Number of worker processes used for count simulations.
Set to 1 for serial execution. Parallel execution splits nsim into
reproducible independent chunks and combines the resulting successes.
Logical. If TRUE, warn about redundant or
uncalibrated multiplicity configurations.
An object of class countss containing the selected sample
size, achieved joint power, confidence interval, input parameters, and the
search history in table.iter and table.test. For count outcomes,
table.iter has one row per evaluated candidate sample size and
table.test contains complete-trial, comparator, and endpoint decision
indicators for each simulated trial and candidate. The count kernel returns
aggregate decision counts rather than raw endpoint-level test statistics, so
component columns preserve the simulated marginal success counts.