Function to evaluate the log likelihood given a set of logged parameter values and a set of observed BIS values. It is assumed that the full set of parameters are given by indices (pk_ix, pd_ix), of which a subset may be fixed (i.e. not updated, but still used to evaluate PK-PD functions).
log_likelihood(lpr, dat, pk_ix, pd_ix, fixed_ix = NULL, fixed_lpr = NULL)
Numeric vector of log-likelihood values
Set of logged PK-PD-error parameter values to be updated. The final value of lpr is assumed to be the residual error term.
data frame with columns c("time","bis") corresponding to observed time and bis values
indices of (pars_pk,pars_pd) corresponding to PK function values
indices of (pars_pk,pars_pd) corresponding to PD function values
indices of (pars_pk,pars_pd) corresponding to PD function values
values used by PD function that are not updated.