\HeaderA{logLik.gam}{Extract the log likelihood for a fitted GAM}{logLik.gam}
\keyword{models}{logLik.gam}
\keyword{smooth}{logLik.gam}
\keyword{regression}{logLik.gam}
\begin{Description}\relax
Function to extract the log-likelihood for a fitted \code{gam}
model (note that the models are usually fitted by penalized likelihood maximization).
\end{Description}
\begin{Usage}
\begin{verbatim}
logLik.gam(object,...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] fitted model objects of class \code{gam} as produced by \code{gam()}.
\item[\code{...}] un-used in this case
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Modification of \code{logLik.glm} which corrects the degrees of
freedom for use with \code{gam} objects. 

The function is provided so that \code{\LinkA{AIC}{AIC}} functions correctly with
\code{gam} objects, and uses the appropriate degrees of freedom (accounting
for penalization). Note,  when using \code{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 in fact
in this case the default smoothing parameter estimation criterion is
effectively this modified AIC.
\end{Details}
\begin{Value}
Standard \code{logLik} object: see \code{\LinkA{logLik}{logLik}}.
\end{Value}
\begin{Author}\relax
Simon N. Wood \email{simon.wood@r-project.org} based directly on \code{logLik.glm}
\end{Author}
\begin{References}\relax
Hastie and Tibshirani, 1990, Generalized Additive Models.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{AIC}{AIC}}
\end{SeeAlso}

