View source: R/negbin_helpers.R
| negbin_theta | R Documentation |
Computes the profile MLE of the shape parameter \theta given
current mean estimates \mu.
negbin_theta(y, mu, weights = 1, init = NULL)
y |
Response vector. |
mu |
Mean vector. |
weights |
Observation weights (default 1). |
init |
Optional initial value for |
Maximizes the profile log-likelihood over \theta via Brent's
method on [10^{-4}, 10^4].
Scalar MLE of \theta.
set.seed(1234)
mu <- rep(5, 200)
y <- rnbinom(200, size = 3, mu = 5)
negbin_theta(y, mu)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.