Returns the conditional mean of the zero-truncated Beta-Binomial, \(E[Y \mid Y > 0] = n \mu / (1 - p_0)\).
Details
Requires \(n \ge 1\) and \(\mu \in (\varepsilon, 1 - \varepsilon)\) so that the zero-truncated distribution is well-defined (i.e., \(p_0 < 1\)).
References
Ghosal, S., Ghosh, S., and Moores, M. (2020). “Hierarchical beta-binomial models for batch effects in cytometry data.” Journal of the Royal Statistical Society: Series A, 183(4), 1579–1601.
See also
Other distributions:
compute_p0(),
dbetabinom(),
dhurdle_betabinom(),
dztbetabinom(),
hurdle_mean(),
hurdle_variance(),
pbetabinom(),
rbetabinom(),
rhurdle_betabinom(),
rztbetabinom()
Examples
# Compare analytical mean with empirical mean
compute_ztbb_mean(10, mu = 0.3, kappa = 5)
#> [1] 3.495269
set.seed(1)
mean(rztbetabinom(10000, n = 10, mu = 0.3, kappa = 5))
#> [1] 3.4795