Returns the log-likelihood of the data at the fitted
coefficients, with df set to the total effective degrees of freedom.
That is deliberately not the fitting criterion: under REML the criterion is
a restricted one, is not a likelihood, and is not comparable across
different mean structures, so using it for AIC would be wrong. It remains
available as fit$objective.
Usage
# S3 method for class 'gamRTMB'
logLik(object, ...)Details
With df = total EDF this is the convention used by mgcv::gam() and by
GAMLSS's GAIC, so AIC() and BIC() are comparable across models fitted
to the same response. Under method = "ML", where effective degrees of
freedom are unavailable, df falls back to counting the fixed
coefficients and free smoothing parameters.