glm.ll: Log-likelihood for GLM

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Calculates the log-likelihood function of a GLM. Currently only the gaussian and the bernoulli family are implemented.

Usage

1
glm.ll(mu, y, phi=1, family="gaussian", k=1)

Arguments

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

Details

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).

Value

log-likelihood value

Author(s)

Marlene Mueller

See Also

glm.lld, glm.link

Examples

1
  glm.ll(rep(0.4,2), c(0,1), family="bernoulli")

gplm documentation built on May 2, 2019, 2:10 a.m.