NONMEM (and nlmixr2) objective function values (OFV) are -2*log-likelihood,
so the log-likelihood of a model is derived as -ofv/2. The number of estimated
parameters (thetas, and unfixed omegas/sigmas) is used as the degrees of freedom.
Because <stats::AIC> and <stats::BIC> dispatch through <stats::logLik>
by default, only logLik.xpose_data needs to be defined here for AIC()/BIC()
to work as expected on xpose_data/xp_xtras objects; no AIC/BIC methods
are defined for a single model.
Not calculable for a model-averaged ("franken") xpose_data object (eg, the
output of <modavg_xpdb>), since such an object does not correspond to a
single fitted model; an error is thrown instead.
Usage
# S3 method for class 'xpose_data'
logLik(object, .problem = NULL, .subprob = NULL, .method = NULL, ...)Value
<logLik> object, as documented in <stats::logLik>, with "df"
(number of estimated parameters) and "nobs" (number of observations) attributes set.
