| .power_count_serial | R Documentation |
Estimate power for count-rate equivalence
.power_count_serial(
n_per_arm,
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,
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),
type_y_active = FALSE
)
n_per_arm |
Subjects per arm. |
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 margin; a scalar or one value per endpoint. |
margin_upper |
Upper rate-ratio margin; a scalar or one value per endpoint. |
model |
Count model: |
dispersion |
Positive negative-binomial dispersion parameter. The
per-subject negative-binomial size is |
alpha |
One-sided significance level. |
nsim |
Number of simulations. |
seed |
Optional random seed. |
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 on the log-rate scale for
the count |
Eper |
Numeric vector of length 2 containing period effects on the log-rate scale. |
Eco |
Numeric vector of length 2 containing carry-over effects on the log-rate scale, ordered as reference carry-over and treatment carry-over. |
dropout |
Numeric vector of length 2 containing dropout proportions for the two crossover sequences. |
type_y_active |
Internal flag indicating whether |
For design = "2x2", complete participants contribute one count
under each treatment. The kernel analyzes within-participant log-rate
contrasts, averages the two sequence-specific estimates to remove period
effects, and applies the carry-over correction implied by
Eco = c(reference_carryover, treatment_carryover). exposure is used as
the log-rate offset. sigmaB is the standard deviation of a subject
random intercept used in the count-generating model; it cancels from the
within-participant treatment contrast. The standard error is estimated from
the empirical variance of the subject-level contrasts. Participants who
drop out before completing both periods do not contribute to this paired
analysis.
An object of class countpower containing estimated power and its
binomial confidence interval.
SimTOST:::power_count(40, 0.20, 0.20, nsim = 100, seed = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.