pk_build {apmx}R Documentation

Create a NONMEM PK(PD) dataset

Description

Input a pre-processed ex and pc domain for combination into a NONMEM dataset. Additional pd endpoints, subject-level covariates, and time-varying covariates can also be added. Other parameters can customize some calculations and formatting.

Usage

pk_build(
  ex,
  pc = NA,
  pd = NA,
  sl.cov = NA,
  tv.cov = NA,
  time.units = "days",
  cycle.length = NA,
  na = -999,
  time.rnd = NULL,
  amt.rnd = NULL,
  dv.rnd = NULL,
  cov.rnd = NULL,
  impute = NA,
  BDV = FALSE,
  DDV = FALSE,
  PDV = FALSE,
  sparse = 3,
  demo.map = TRUE,
  tv.cov.fill = "downup",
  keep.other = TRUE
)

Arguments

ex

dose event dataframe

pc

pc event dataframe

pd

pd event dataframe

sl.cov

subject-level covariate dataframe

tv.cov

time-varying covariate dataframe

time.units

units for time attributes

cycle.length

cycle length in units of days

na

value for missing numeric items

time.rnd

time attribute rounding parameter

amt.rnd

amount attribute rounding parameter

dv.rnd

dependent variable attribute rounding parameter

cov.rnd

covariate attribute rounding parameter

impute

imputation method

BDV

baseline pd attribute

DDV

change from baseline pd attribute

PDV

percent change from baseline pd attribute

sparse

threshold for sparse sampling

demo.map

toggle pre-set numeric values for SEX, RACE, and ETHNIC demographic variables

tv.cov.fill

time-varying covariate fill direction

keep.other

filter to keep or remove other events, EVID = 2

Value

PK(PD) dataset

Examples

## Simple ex domain with 1 subject and 1 dose
ex <- data.frame(STUDYID = "ABC101",
                 USUBJID = "ABC101-001",
                 EXSTDTC = "2000-01-01 10:00:00",
                 EXSTDY = 1,
                 EXTPTNUM = 0,
                 EXDOSE = 100,
                 CMT = 1,
                 EXTRT = "ABC",
                 EXDOSU = "mg",
                 VISIT = "Day 1",
                 EXTPT = "Dose",
                 EXDOSFRQ = "Once",
                 EXROUTE = "Oral")

## Simple pc domain with 1 subject and 3 observations
pc <- data.frame(USUBJID = "ABC101-001",
                 PCDTC = c("2000-01-01 09:40:00",
                           "2000-01-01 10:29:00",
                           "2000-01-01 12:05:00"),
                 PCDY = 1,
                 PCTPTNUM = c(0, ##Units of hours
                              0.021,
                              0.083),
                 PCSTRESN = c(NA,
                              469,
                              870),
                 PCLLOQ = 25,
                 CMT = 2,
                 VISIT = "Day 1",
                 PCTPT = c("Pre-dose",
                           "30-min post-dose",
                           "2-hr post-dose"),
                 PCTEST = "ABC",
                 PCSTRESU = "ug/mL")

## Create with pk_build()
df <- pk_build(ex, pc)


[Package apmx version 1.1.1 Index]