nb.loglik.regression: log-likelihood of the NB regression model

View source: R/optimnb.R

nb.loglik.regressionR Documentation

log-likelihood of the NB regression model

Description

This function computes the log-likelihood of a NB regression model given a vector of counts.

Usage

nb.loglik.regression(
  alpha,
  Y,
  A.mu = matrix(nrow = length(Y), ncol = 0),
  C.theta = matrix(0, nrow = length(Y), ncol = 1)
)

Arguments

alpha

the vectors of parameters a.mu concatenated

Y

the vector of counts

A.mu

matrix of the model (see Details, default=empty)

C.theta

matrix of the model (log(\theta), default=zero)

Details

The regression model is parametrized as follows:

log(\mu) = A_\mu * a_\mu

log(\theta) = C_\theta

where \mu, \theta are respectively the vector of mean parameters of the NB distribution, and the vector of inverse dispersion parameters. The log-likelihood of a vector of parameters \alpha = a_\mu

Value

the log-likelihood.


drisso/learn2count documentation built on March 25, 2023, 4:21 p.m.