glm.ll {gplm} | R Documentation |
Calculates the log-likelihood function of a GLM. Currently only the gaussian and the bernoulli family are implemented.
glm.ll(mu, y, phi=1, family="gaussian", k=1)
mu |
n x 1, predicted regression function |
y |
n x 1, responses |
phi |
scalar, nuisance parameter (sigma^2 for the gaussian and inverse gaussian families, nu for the gamma family) |
family |
text string, family of distributions (e.g. "gaussian" or "bernoulli", see details below) |
k |
integer > 0, parameter for the negative binomial |
Implemented are the "gaussian" family (with links "identity" and "log"), the "bernoulli" family (with links "logit" and "probit"), the "gamma" family (with link "inverse"), the "poisson" family (with link "log"), the "inverse.gaussian" family (with link "inverse.squared") and the "negative.binomial" (with its canonical "log" type link).
The default value k=1 leads to the geometric distribution (as a special case of the negative binomial).
log-likelihood value
Marlene Mueller
glm.ll(rep(0.4,2), c(0,1), family="bernoulli")