logLik.glm               package:base               R Documentation

Extract Log-Likelihood from an glm Object

Description:

     Returns the log-likelihood value of the generalized linear model
     represented by `object' evaluated at the estimated coefficients.

Usage:

     logLik(object, ...)

Arguments:

  object: an object inheriting from class `"glm"'.

     ...: further arguments to be passed to or from methods.

Value:

     the log-likelihood of the linear model represented by `object'
     evaluated at the estimated coefficients.

See Also:

     `glm', `logLik.lm'

Examples:

     ##-- Continuing the  glm(.) example:
     Eq <- function(x,y) all.equal(x,y, tol = 1e-12)
     stopifnot(Eq(AIC(anorex.1), anorex.1$aic),
               Eq(AIC(g1), g1$aic),
               Eq(AIC(g2), g2$aic))

