Learn R Programming

tci (version 0.2.0)

sample_iiv: Sample PK or PK-PD parameters from the distribution of inter- or intra-individual variability

Description

Sample PK or PK-PD parameters from the distribution of random effects for a `pkmod` or `poppkmod` object, as described by the Omega matrix (see ?pkmod).

Usage

sample_iiv(mod, log_normal = TRUE, ...)

Value

Returns model passed to "mod" argument with randomly sampled PK or PK-PD parameters.

Arguments

mod

`pkmod` or `poppkmod` object with associated Omega matrix describing random effect variances

log_normal

Logical. Assumes random effects are log-normally distributed and multiplicative if TRUE, additive and normally distributed if FALSE.

...

Arguments passed to update.pkmod.

Examples

Run this code
# sample from single PK model
sample_iiv(pkmod_schnider(AGE = 40,HGT=170,TBW=50,MALE=TRUE))
# sample from `poppkmod`
data <- data.frame(ID = 1:5, AGE = seq(20,60,by=10), TBW = seq(60,80,by=5),
HGT = seq(150,190,by=10), MALE = c(TRUE,TRUE,FALSE,FALSE,FALSE))
sample_iiv(poppkmod(data = data, drug = "ppf", model = "eleveld"))

Run the code above in your browser using DataLab