Repository navigation
Expand file tree
/
Copy pathdbell.Rd
More file actions
64 lines (55 loc) · 1.97 KB
/
Copy pathdbell.Rd
File metadata and controls
64 lines (55 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distributions.R
\name{dbell}
\alias{dbell}
\alias{pbell}
\title{The Bell Distribution}
\usage{
dbell(x, theta, log = FALSE)
pbell(q, mu, lower.tail = TRUE, log.p = FALSE)
}
\arguments{
\item{x}{vector of non-negative integer quantiles.}
\item{theta}{vector of positive Bell parameters. Related to the mean by
\eqn{\mu = \theta e^{\theta}}.}
\item{log}{logical; if \code{TRUE} the log-density is returned.}
\item{q}{vector of quantiles.}
\item{mu}{vector of positive means. Related to the Bell parameter by
\eqn{\theta = W(\mu)}, where \eqn{W} is the Lambert W function.}
\item{lower.tail}{logical; if \code{TRUE} (default), probabilities are
\eqn{P(X \le q)}.}
\item{log.p}{logical; if \code{TRUE} probabilities are returned on the
log scale.}
}
\value{
\code{dbell} gives the density; \code{pbell} gives the cumulative
distribution function.
}
\description{
Density and cumulative distribution function for the Bell distribution.
}
\details{
The Bell distribution (Castellares et al. 2018) has probability mass function
\deqn{P(X = x) = \frac{e^{1 - e^{\theta}} \theta^{x} B_{x}}{x!}}
for \eqn{x = 0, 1, 2, \ldots} and \eqn{\theta > 0}, where \eqn{B_x} is the
\eqn{x}-th Bell number. The mean is \eqn{\mu = \theta e^{\theta}}.
\code{dbell} is parameterized by \code{theta}; \code{pbell} is
parameterized by the mean \code{mu} (as used in \code{\link{bell}} models).
Both use internal C-level implementations with no external package
dependencies.
}
\examples{
dbell(0:5, theta = 1)
pbell(0:5, mu = exp(1)) ## theta = 1 implies mu = e
}
\references{
Castellares, F., Ferrari, S. L. P., Lemonte, A. J. (2018).
On the Bell distribution and its associated regression model for count data.
\emph{Applied Mathematical Modelling} \bold{56}:172--185.
\doi{10.1016/j.apm.2017.12.014}
}
\seealso{
\code{\link{bell}} for the Bell family in \pkg{glmmTMB};
\link{Distributions} for other standard distributions.
}
\keyword{distribution}