R/model-contr.R
loglik.likelihood_contr_model.RdReturns a log-likelihood function that caches the data frame split and
resolved dispatchers. During optimization, optim calls the returned
function hundreds of times with the same df but varying par –
caching eliminates repeated split() and obs_type() overhead.
# S3 method for class 'likelihood_contr_model'
loglik(model, ...)A function to compute the log-likelihood given a data frame and parameters