The sim_power_nbinom function is used to estimate the
empirical power of a negative binomial regression model. This method is
useful when outcomes consist of overdispersed count data, and the
objective is to test whether the relative risk (RR) between two groups
differs significantly from a null boundary.
Data are simulated under a negative binomial distribution, a model is
fit using glm.nb, and it is determined whether the null
hypothesis is rejected based on confidence interval limits relative to a
specified boundary. The procedure accounts for whether the true RR is
below or above 1, applying the appropriate directional test logic.
What is the empirical power, using negative binomial regression, to detect a vaccine efficacy of 60% when the lower bound of a 95% confidence interval must exceed a boundary of 30%, if the sample size is 500 per group, the average follow-up is 1 year, the event rate in the control group is 0.2 episodes per person-year, and the dispersion parameter is 2?