PKmod {PKPDmodels}R Documentation

PK models with linear elimination

Description

Create a model function with gradient evaluation (and, optionally, Hessian evaluation) for a model according to the number of compartments, the form of administration and dosage of the drug after performing any substitutions given.

Usage

  PKmod(admin = c("bolus", "infusion", "oral"),
    dosage = c("sd", "md", "ss"), subst = list(), cpt = 1L,
    hessian = FALSE)

Arguments

admin

form of administration of the drug, one of "bolus", "infusion" or "oral". Defaults to "bolus".

dosage

type of dosage of the drug, one of "sd" (single dose), "md" (multiple dose) or "ss" (steady-state). Defaults to "sd".

subst

a list of formulas of substitutions to perform

cpt

scalar integer - the number of model compartments.

hessian

a logical value indicating whether the second derivatives should be calculated and incorporated in the return value.

Details

The substitutions are given as a list of formulas, such as list(k ~ Cl/V, Cl ~ exp(lCl), V ~ exp(lV)). They are applied left to right.

Value

a byte-compiled model function with gradient evaluation

Examples

## return a function with substitutions
PKmod("bolus", "sd", list(k ~ Cl/V, Cl ~ exp(lCl), V ~ exp(lV)))

[Package PKPDmodels version 0.3.2 Index]