Learn R Programming

tci (version 0.1.2)

log_likelihood: Evaluate log-likelihood

Description

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).

Usage

log_likelihood(lpr, dat, pk_ix, pd_ix, fixed_ix = NULL, fixed_lpr = NULL)

Value

Numeric vector of log-likelihood values

Arguments

lpr

Set of logged PK-PD-error parameter values to be updated. The final value of lpr is assumed to be the residual error term.

dat

data frame with columns c("time","bis") corresponding to observed time and bis values

pk_ix

indices of (pars_pk,pars_pd) corresponding to PK function values

pd_ix

indices of (pars_pk,pars_pd) corresponding to PD function values

fixed_ix

indices of (pars_pk,pars_pd) corresponding to PD function values

fixed_lpr

values used by PD function that are not updated.