| sampleSize_count | R Documentation |
Searches for the smallest number of subjects per arm whose simulated power reaches the target for a rate-ratio equivalence test.
sampleSize_count(
power = 0.8,
rate_test,
rate_reference,
exposure = 1,
margin_lower = 0.8,
margin_upper = 1.25,
model = c("poisson", "negative-binomial"),
dispersion = 0.1,
alpha = 0.05,
nsim = 5000,
seed = NULL,
lower = 2,
upper = 500,
design = c("parallel", "2x2"),
k = NULL,
endpoint_corr = NULL,
type_y = NULL,
adjust = c("none", "bonferroni", "sidak", "t", "pc", "partial-conjunction",
"partial_conjunction", "sequential"),
sigmaB = 0,
Eper = c(0, 0),
Eco = c(0, 0),
dropout = c(0, 0),
optimization_method = c("fast", "step-by-step"),
step.power = 6,
step.up = TRUE,
pos.side = FALSE,
maxiter = 1000,
ncores = 1,
.warn_redundant_bon = TRUE
)
power |
Target power. |
rate_test |
Event rate in the test arm. |
rate_reference |
Event rate in the reference arm. |
exposure |
Exposure per subject; a scalar or one value per endpoint. |
margin_lower |
Lower rate-ratio equivalence margin. |
margin_upper |
Upper rate-ratio equivalence margin. |
model |
Count model: |
dispersion |
Positive negative-binomial dispersion parameter. The
per-subject negative-binomial size is |
alpha |
One-sided significance level. |
nsim |
Number of simulated trials. |
seed |
Optional random seed. |
lower |
Minimum subjects per arm. |
upper |
Maximum subjects per arm. |
design |
Trial design: |
k |
Number of endpoints that must demonstrate equivalence. Defaults to all supplied endpoints. |
endpoint_corr |
Endpoint correlation matrix used by the Gaussian copula for multi-endpoint count simulations. The default is independence. |
type_y |
Numeric endpoint hierarchy used with |
adjust |
Multiplicity adjustment for endpoint-wise one-sided alpha:
|
sigmaB |
Between-subject standard deviation for the count 2x2 design. |
Eper |
Period effects for the count 2x2 design. |
Eco |
Carry-over effects for the count 2x2 design. |
dropout |
Dropout proportions for the count 2x2 design. |
optimization_method |
Search method. |
step.power |
Initial power-of-two jump used by the fast search. |
step.up |
Direction of the initial bracketing search. |
pos.side |
Retained for compatibility with |
maxiter |
Maximum number of power evaluations. |
ncores |
Number of worker processes used for count simulations.
Set to 1 for serial execution. Parallel execution splits |
.warn_redundant_bon |
Logical. If |
An object of class countss containing the selected sample size,
achieved 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. 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.
SimTOST:::sampleSize_count(0.80, 0.20, 0.20, lower = 100, upper = 2000,
nsim = 100, seed = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.