zinb.loglik.dispersion | R Documentation |
Given a unique dispersion parameter and a set of counts, together with a corresponding set of mean parameters and probabilities of zero components, this function computes the sum of the log-probabilities of the counts under the ZINB model. The dispersion parameter is provided to the function through zeta = log(theta), where theta is sometimes called the inverse dispersion parameter. The probabilities of the zero components are provided through their logit, in order to better numerical stability.
zinb.loglik.dispersion(zeta, Y, mu, logitPi)
zeta |
a scalar, the log of the inverse dispersion parameters of the negative binomial model |
Y |
a vector of counts |
mu |
a vector of mean parameters of the negative binomial |
logitPi |
a vector of logit of the probabilities of the zero component |
the log-likelihood of the model.
zinb.loglik
.
mu <- seq(10,50,length.out=10)
logitPi <- rnorm(10)
zeta <- rnorm(10)
Y <- rnbinom(n=10, size=exp(zeta), mu=mu)
zinb.loglik.dispersion(zeta, Y, mu, logitPi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.