The BGLIMM procedure forms the log likelihoods of generalized linear models as
where is the log-likelihood contribution of the ith observation with weight
and
is the value of the frequency variable. In the case where observations have weights, the scale parameter is replaced with
in the density, where
is the weight associated with the observation
. For the determination of
and
, see the WEIGHT and FREQ statements.
The individual log-likelihood contributions for the various distributions are as follows:
where and
are the events and trials in the events/trials syntax, and
.
.
. For a given k, the negative binomial distribution is a member of the exponential family. The parameter k is related to the scale of the data, because it is part of the variance function. However, it cannot be factored from the variance, as is the case with the
parameter in many other distributions. The parameter k is designated as "Scale" in the output of PROC BGLIMM.
Define the parameter vector for the generalized linear model as , if
, and as
otherwise.
denotes the fixed-effects parameters in the linear predictor. For the negative binomial distribution, the relevant parameter vector is
. The gradient and Hessian of the negative log likelihood are then