Negative Binomial Distribution
Usage
Nbinom(size = 1, prob = 0.5)
# S4 method for class 'Nbinom,numeric'
d(distr, x)
# S4 method for class 'Nbinom,numeric'
p(distr, x)
# S4 method for class 'Nbinom,numeric'
qn(distr, x)
# S4 method for class 'Nbinom,numeric'
r(distr, n)
# S4 method for class 'Nbinom'
mean(x)
# S4 method for class 'Nbinom'
median(x)
# S4 method for class 'Nbinom'
mode(x)
# S4 method for class 'Nbinom'
var(x)
# S4 method for class 'Nbinom'
sd(x)
# S4 method for class 'Nbinom'
skew(x)
# S4 method for class 'Nbinom'
kurt(x)
# S4 method for class 'Nbinom'
entro(x)
# S4 method for class 'Nbinom'
finf(x)
llnbinom(x, size, prob)
# S4 method for class 'Nbinom,numeric'
ll(distr, x)
enbinom(x, size, type = "mle", ...)
# S4 method for class 'Nbinom,numeric'
mle(distr, x)
# S4 method for class 'Nbinom,numeric'
me(distr, x)
vnbinom(size, prob, type = "mle")
# S4 method for class 'Nbinom'
avar_mle(distr)
# S4 method for class 'Nbinom'
avar_me(distr)Arguments
- size, prob
numeric. The distribution parameters.
- distr
an object of class
Nbinom.- x
an object of class
Nbinom. If the function also has adistrargument,xis a numeric vector, a sample of observations.- n
numeric. The sample size.
- type
character, case ignored. The estimator type (mle, me, or same).
- ...
extra arguments.
Value
Each type of function returns a different type of object:
Distribution Functions: When supplied with one argument (
distr), thed(),p(),q(),r(),ll()functions return the density, cumulative probability, quantile, random sample generator, and log-likelihood functions, respectively. When supplied with both arguments (distrandx), they evaluate the aforementioned functions directly.Moments: Returns a numeric, either vector or matrix depending on the moment and the distribution. The
moments()function returns a list with all the available methods.Estimation: Returns a list. The estimator of the unknown parameters. Note that in distribution families like the binomial, multinomial, and negative binomial, the size is not returned, since it is considered known.
Variance: Returns a named matrix. The asymptotic covariance matrix of the estimator.