logLik.gam {mgcv} | R Documentation |
Function to extract the log-likelihood for a fitted gam
model (note that the models are usually fitted by penalized likelihood maximization).
## S3 method for class 'gam' logLik(object,...)
object |
fitted model objects of class |
... |
un-used in this case |
Modification of logLik.glm
which corrects the degrees of
freedom for use with gam
objects.
The function is provided so that AIC
functions correctly with
gam
objects, and uses the appropriate degrees of freedom (accounting
for penalization). Note, when using AIC
for penalized models, that the
degrees of freedom are the effective degrees of freedom and not the number of
parameters, and the model maximizes the penalized likelihood, not the actual
likelihood! This seems to be reasonably well founded for the known scale
parameter case (see Hastie and Tibshirani, 1990, section 6.8.3 and also Wood 2008),
and in fact in this case the default smoothing parameter estimation criterion is
effectively this modified AIC.
Standard logLik
object: see logLik
.
Simon N. Wood simon.wood@r-project.org based directly on logLik.glm
Hastie and Tibshirani, 1990, Generalized Additive Models.
Wood, S.N. (2008) Fast stable direct fitting and smoothness selection for generalized additive models. J.R.Statist. Soc. B 70(3):495-518