sim_power_ni_normal: Empirical Power for Non-Inferiority (Normal Outcomes)
Description
Estimates empirical power to declare non-inferiority between two groups across multiple outcomes using
t-tests. Simulates normally distributed data under the null (no difference) and applies
non-inferiority rules based on user-defined required and optional tests.
An S3 object of class empirical_power_result, which contains
the estimated empirical power and its confidence interval. The object can
be printed, formatted, or further processed using associated S3 methods.
See also empirical_power_result.
Arguments
nsim
Integer. Number of simulations to perform.
npergroup
Integer. Number of observations per group.
ntest
Integer. Number of tests (outcomes) to compare.
ni_limit
Numeric. Limit to declare non-inferiority. Can be a scalar or vector of length ntest.
test_req
Integer. Number of required tests that must show non-inferiority (first test_req tests).
test_opt
Integer. Number of optional tests that must also show non-inferiority from the remaining tests.
sd
Numeric. Standard deviation(s) of the outcomes. Scalar or vector of length ntest.
corr
Numeric. Correlation between the tests. Scalar (common correlation), or vector of length ntest*(ntest-1)/2.
t_level
Numeric. Confidence level used for the t-tests (e.g., 0.95 for 95% CI).scalar or vector of length ntest.
conf.level
Numeric. Confidence level for the empirical power estimate
Details
A test is considered non-inferior if the lower bound of its confidence interval is greater
than the specified non-inferiority limit. Overall non-inferiority is declared if all
test_req and at least test_opt of the remaining tests are non-inferior.