pkbuild: Automatic PK model building

View source: R/pkbuild.R

pkbuildR Documentation

Automatic PK model building

Description

Fit several structural PK models and select the best one based on a Bayesian Information Criterion. Models to compare can be defined by rate constants and/or clearances and can include or not nonlinear elimination models. See https://monolix.lixoft.com/rsmlx/pkbuild/ for more details.

Usage

pkbuild(
  data = NULL,
  project = NULL,
  stat = FALSE,
  param = "clearance",
  new.dir = ".",
  MM = FALSE,
  linearization = F,
  criterion = "BICc",
  level = NULL,
  settings.stat = NULL
)

Arguments

data

a list with fields

  • dataFile: path of a formatted data file

  • headerTypes: a vector of strings

  • administration ("iv", "bolus", "infusion", "oral", "ev"): route of administration

project

a Monolix project

stat

(FALSE, TRUE): the statistical model is also built (using buildmlx) (default=FALSE)

param

("clearance", "rate", "both): parametrization (default="clearance")

new.dir

name of the directory where the created files are stored (default is the current working directory) )

MM

(FALSE, TRUE): tested models include or not Michaelis Menten elimination models (default=FALSE)

linearization

TRUE/FALSE whether the computation of the likelihood is based on a linearization of the model (default=FALSE)

criterion

penalization criterion to optimize c("AIC", "BIC", "BICc", gamma) (default="BICc")

level

an integer between 1 and 9 (used by setSettings)

settings.stat

list of settings used by buildmlx (only if stat=TRUE)

Value

A list of results

Examples

## Not run: 
# Build a PK model for the warfarin PK data. 
# By default, only models using clearance (and inter compartmental clearances) are used
warf.pk1 <- pkbuild(data=warfarin)

# Models using elimination and transfer rate constants are used, 
# as well as nonlinear elimination models
warf.pk2 <- pkbuild(data=warfarin,  new.dir="warfarin", param="rate", MM=TRUE)

# Both models using clearances and rates are used. 
# Level is set to 7 in order to get accurate results.
warf.pk3 <- pkbuild(data=warfarin,  new.dir="warfarin", param="both", level=7)

## End(Not run)

Rsmlx documentation built on Oct. 17, 2023, 5:09 p.m.

Related to pkbuild in Rsmlx...