| library(depower) set.seed(20251004) sim_nb( n1 =c(3, 10, 20, 40, 60, 100), mean1 = 10, ratio = 2, dispersion1 = 1, dispersion2 = 1, nsims = 10000 ) |> power ( ”Simulated NB LRT” = lrt_nb( distribution = simulated(nsims = 20000) ), alpha = 50 / (10000 * 0.8) ) |> plot(hline = 0.8) |