log_likelihood: Log-likelihood for PK parameters

View source: R/log_likelihood.R

log_likelihoodR Documentation

Log-likelihood for PK parameters

Description

Evaluates the prior distribution (normal) of the log parameter vector with normally distributed error.

Usage

log_likelihood(lpr, ivt, dat, init = c(0, 0))

Arguments

lpr

log-PK parameter vector with error: (lv_1, lk_10, lk_12, lk_21, ler_mean)

ivt

List with containing start of infusion times (h), end of infusion times (h), and rate of infusion (g/h) at each dose

dat

Concentration data frame of the form: data.frame(time (h), concentration (milligrams/dl))

init

Initial concentrations in each compartment

Value

The value of the log-likelihood evaluated at the specified log-parameter vector

Examples

ivt_d <- list(list(begin=0.0, end=0.5, k_R=6),
              list(begin=8.0, end=8.5, k_R=6),
              list(begin=16.0, end=16.5, k_R=6))
dat_d <- data.frame(time_h = c(1,4,40), conc_mcg_ml = c(82.7,80.4,60))

log_likelihood(lpr = c(getOption("pkpredict.pip.default.prior")$log_pk_mean,
                       getOption("pkpredict.pip.default.prior")$log_err_mean),
               ivt = ivt_d, dat = dat_d)


hlweeks/pkpredict documentation built on Oct. 29, 2023, 6:08 a.m.