Density and cumulative distribution function for the Bell distribution.
dbell(x, theta, log = FALSE)pbell(q, mu, lower.tail = TRUE, log.p = FALSE)
dbell gives the density; pbell gives the cumulative
distribution function.
vector of non-negative integer quantiles.
vector of positive Bell parameters. Related to the mean by \(\mu = \theta e^{\theta}\).
logical; if TRUE the log-density is returned.
vector of quantiles.
vector of positive means. Related to the Bell parameter by \(\theta = W(\mu)\), where \(W\) is the Lambert W function.
logical; if TRUE (default), probabilities are
\(P(X \le q)\).
logical; if TRUE probabilities are returned on the
log scale.
The Bell distribution (Castellares et al. 2018) has probability mass function $$P(X = x) = \frac{e^{1 - e^{\theta}} \theta^{x} B_{x}}{x!}$$ for \(x = 0, 1, 2, \ldots\) and \(\theta > 0\), where \(B_x\) is the \(x\)-th Bell number. The mean is \(\mu = \theta e^{\theta}\).
dbell is parameterized by theta; pbell is
parameterized by the mean mu (as used in bell models).
Both use internal C-level implementations with no external package
dependencies.
Castellares, F., Ferrari, S. L. P., Lemonte, A. J. (2018). On the Bell distribution and its associated regression model for count data. Applied Mathematical Modelling 56:172--185. tools:::Rd_expr_doi("10.1016/j.apm.2017.12.014")
bell for the Bell family in glmmTMB;
Distributions for other standard distributions.
dbell(0:5, theta = 1)
pbell(0:5, mu = exp(1)) ## theta = 1 implies mu = e
Run the code above in your browser using DataLab