wald_test_bnb().
The function used Eq. (10) of Rettiganti and Nagaraja (2012), which omits a factor of the mean from one term of the denominator.
The function now uses the inverse of the Fisher information matrix in the appendix of that paper, which gives ratio * (1 + ratio) / (n * mean1).
power() also change, because wald_test_bnb() is its default test for BNB data.n = 4, mean1 = 9.75, and dispersion = 2 has type I error 0.05, compared with 0.07 before this fix.1e-3, which can only increase the p-value.add_power_ci() and add_power_pi() for confidence intervals and prediction intervals of the power estimate, respectively.
power().plot.depower() will add shaded regions for the intervals.eval_power_ci() and eval_power_pi() for confidence intervals and prediction intervals of the power estimate, respectively.
add_power_*() variants, these are for planning power simulation studies.Add functions asymptotic() and simulated() for specification of type of
test.
Add argument distribution to functions:
wald_test_nb()wald_test_bnb()lrt_nb()lrt_bnb()for control of running an asymptotic, randomization, or parametric simulation test.
equal_dispersion argument in function lrt_nb() was not passed downstream and instead fixed to FALSE.mean2 and dispersion2 in functions glm_nb(), glmm_bnb(), and glmm_poisson().First release to CRAN.
power()plot.depower()sim_log_lognormal()sim_nb()sim_bnb()t_test_welch()t_test_paired()wald_test_nb()wald_test_bnb()lrt_nb()lrt_bnb()glm_nb()glmm_bnb()glmm_poisson()mle_nb_null() and mle_nb_alt()mle_bnb_null() and mle_bnb_alt()nll_nb_null() and nll_nb_alt()nll_bnb_null() and nll_bnb_alt()Proof of concept.