Description Usage Arguments Value Examples
View source: R/estimator_for_negative_binomial.R
Computes a robust estimate of the parameters of a negative binomial random variable.
1 | rob_estimate_negbin(x, start = NULL)
|
x |
A vector of univariate observations |
start |
Initial vector of parameters to start the optimization |
The estimated vector of parameters. The first entry is the mean and the second is the dispersion parameter, that equals 1/size.
1 2 3 4 | library(MASS)
x <- rnbinom(100,mu=2,size=1)
MASS::fitdistr(x,dens="negative binomial")
rob_estimate_negbin(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.