3  Interval Selection and Parameter Catalogue

Intervals tell PKNCA when to calculate and what to calculate. Every NCA parameter is associated with exactly one interval row, and each row is independent of all others.


3.1 1. The Interval Data Frame Structure

An interval specification is a plain R data.frame with one row per calculation window. Two columns are required:

Column Type Meaning
start numeric Start of the calculation window (same units as time)
end numeric End of the calculation window; use Inf for open-ended windows

Every remaining column is a parameter flag: its name must match a known PKNCA parameter name and its value must be TRUE (calculate) or FALSE (skip). Columns set to FALSE are simply ignored, so you only need to list the parameters you actually want.

# A minimal interval: AUClast over the first 24 hours
my_intervals <- data.frame(
  start   = 0,
  end     = 24,
  auclast = TRUE
)
my_intervals
  start end auclast
1     0  24    TRUE

You can also request multiple parameters in a single row:

data.frame(
  start      = 0,
  end        = Inf,
  cmax       = TRUE,
  tmax       = TRUE,
  half.life  = TRUE,
  aucinf.obs = TRUE
)
  start end cmax tmax half.life aucinf.obs
1     0 Inf TRUE TRUE      TRUE       TRUE

Column names cannot overlap with start, end, or any grouping variable name you use in PKNCAconc().


3.2 2. Group Matching

PKNCA matches interval rows to concentration data by comparing the shared column names between the interval data frame and the grouping columns of the concentration object. Any column that appears in both is used as a matching key.

data("Theoph")

d_conc <- PKNCAconc(Theoph, conc ~ Time | Subject)

# Intervals with a Subject column — each row applies to exactly one subject
subject_intervals <- data.frame(
  Subject = c("1", "2"),
  start   = c(0, 0),
  end     = c(24, 24),
  auclast = TRUE
)

# Intervals without Subject — this row applies to ALL subjects (default interval)
default_interval <- data.frame(
  start   = 0,
  end     = 24,
  auclast = TRUE
)

If an interval row has no group columns, it is a default interval and is applied to every group present in the concentration data that does not have a more specific match. This is useful when the same calculation windows apply to all subjects and analytes.


3.3 3. Default Intervals via PKNCAdata() with No intervals Argument

When you call PKNCAdata() without an explicit intervals argument, PKNCA substitutes the built-in default single-dose intervals. These are stored in PKNCA.options("single.dose.aucs"):

PKNCA.options("single.dose.aucs")
  start end auclast aucall aumclast aumcall aucint.last aucint.last.dose
1     0  24    TRUE  FALSE    FALSE   FALSE       FALSE            FALSE
2     0 Inf   FALSE  FALSE    FALSE   FALSE       FALSE            FALSE
  aucint.all aucint.all.dose aumcint.last aumcint.last.dose aumcint.all
1      FALSE           FALSE        FALSE             FALSE       FALSE
2      FALSE           FALSE        FALSE             FALSE       FALSE
  aumcint.all.dose    c0  cmax  cmin  tmax  tmin tlast tfirst clast.obs cl.last
1            FALSE FALSE FALSE FALSE FALSE FALSE FALSE  FALSE     FALSE   FALSE
2            FALSE FALSE  TRUE FALSE  TRUE FALSE FALSE  FALSE     FALSE   FALSE
  cl.all cl.int.all cl.int.last     f mrt.last mrt.all mrt.int.all mrt.int.last
1  FALSE      FALSE       FALSE FALSE    FALSE   FALSE       FALSE        FALSE
2  FALSE      FALSE       FALSE FALSE    FALSE   FALSE       FALSE        FALSE
  mrt.iv.last vss.last vss.iv.last vss.all vss.int.all vss.int.last   cav
1       FALSE    FALSE       FALSE   FALSE       FALSE        FALSE FALSE
2       FALSE    FALSE       FALSE   FALSE       FALSE        FALSE FALSE
  cav.int.last cav.int.all ctrough cstart   ptr  tlag deg.fluc swing  ceoi
1        FALSE       FALSE   FALSE  FALSE FALSE FALSE    FALSE FALSE FALSE
2        FALSE       FALSE   FALSE  FALSE FALSE FALSE    FALSE FALSE FALSE
  aucabove.predose.all aucabove.trough.all count_conc count_conc_measured
1                FALSE               FALSE      FALSE               FALSE
2                FALSE               FALSE      FALSE               FALSE
  totdose volpk    ae clr.last clr.obs clr.pred    fe ertlst ermax ertmax
1   FALSE FALSE FALSE    FALSE   FALSE    FALSE FALSE  FALSE FALSE  FALSE
2   FALSE FALSE FALSE    FALSE   FALSE    FALSE FALSE  FALSE FALSE  FALSE
  sparse_auclast sparse_auc_se sparse_auc_df sparse_aumclast sparse_aumc_se
1          FALSE         FALSE         FALSE           FALSE          FALSE
2          FALSE         FALSE         FALSE           FALSE          FALSE
  sparse_aumc_df time_above aucivlast aucivall aucivint.last aucivint.all
1          FALSE      FALSE     FALSE    FALSE         FALSE        FALSE
2          FALSE      FALSE     FALSE    FALSE         FALSE        FALSE
  aucivpbextlast aucivpbextall aucivpbextint.last aucivpbextint.all aumcivlast
1          FALSE         FALSE              FALSE             FALSE      FALSE
2          FALSE         FALSE              FALSE             FALSE      FALSE
  aumcivall aumcivint.last aumcivint.all half.life r.squared adj.r.squared
1     FALSE          FALSE         FALSE     FALSE     FALSE         FALSE
2     FALSE          FALSE         FALSE      TRUE     FALSE         FALSE
  lambda.z.corrxy lambda.z lambda.z.time.first lambda.z.time.last
1           FALSE    FALSE               FALSE              FALSE
2           FALSE    FALSE               FALSE              FALSE
  lambda.z.n.points clast.pred span.ratio tobit_residual adj_tobit_residual
1             FALSE      FALSE      FALSE          FALSE              FALSE
2             FALSE      FALSE      FALSE          FALSE              FALSE
  lambda.z.n.points_blq thalf.eff.last thalf.eff.iv.last kel.last kel.iv.last
1                 FALSE          FALSE             FALSE    FALSE       FALSE
2                 FALSE          FALSE             FALSE    FALSE       FALSE
  kel.all kel.int.all kel.int.last cl.iv.all cl.iv.last cl.ivint.all
1   FALSE       FALSE        FALSE     FALSE      FALSE        FALSE
2   FALSE       FALSE        FALSE     FALSE      FALSE        FALSE
  cl.ivint.last cl.sparse.last mrt.sparse.last mrt.iv.all mrt.ivint.all
1         FALSE          FALSE           FALSE      FALSE         FALSE
2         FALSE          FALSE           FALSE      FALSE         FALSE
  mrt.ivint.last vz.all vz.int.all vz.int.last vz.iv.all vz.iv.last
1          FALSE  FALSE      FALSE       FALSE     FALSE      FALSE
2          FALSE  FALSE      FALSE       FALSE     FALSE      FALSE
  vz.ivint.all vz.ivint.last vz.last vss.iv.all vss.ivint.all vss.ivint.last
1        FALSE         FALSE   FALSE      FALSE         FALSE          FALSE
2        FALSE         FALSE   FALSE      FALSE         FALSE          FALSE
  vss.sparse.last aucinf.obs aucinf.pred aumcinf.obs aumcinf.pred
1           FALSE      FALSE       FALSE       FALSE        FALSE
2           FALSE       TRUE       FALSE       FALSE        FALSE
  aucint.inf.obs aucint.inf.obs.dose aucint.inf.pred aucint.inf.pred.dose
1          FALSE               FALSE           FALSE                FALSE
2          FALSE               FALSE           FALSE                FALSE
  aumcint.inf.obs aumcint.inf.obs.dose aumcint.inf.pred aumcint.inf.pred.dose
1           FALSE                FALSE            FALSE                 FALSE
2           FALSE                FALSE            FALSE                 FALSE
  aucivinf.obs aucivinf.pred aucivpbextinf.obs aucivpbextinf.pred aumcivinf.obs
1        FALSE         FALSE             FALSE              FALSE         FALSE
2        FALSE         FALSE             FALSE              FALSE         FALSE
  aumcivinf.pred aucpext.obs aucpext.pred kel.iv.all kel.ivint.all
1          FALSE       FALSE        FALSE      FALSE         FALSE
2          FALSE       FALSE        FALSE      FALSE         FALSE
  kel.ivint.last kel.sparse.last cl.obs cl.pred cl.int.inf.obs cl.int.inf.pred
1          FALSE           FALSE  FALSE   FALSE          FALSE           FALSE
2          FALSE           FALSE  FALSE   FALSE          FALSE           FALSE
  cl.iv.obs cl.iv.pred mrt.obs mrt.pred mrt.int.inf.obs mrt.int.inf.pred
1     FALSE      FALSE   FALSE    FALSE           FALSE            FALSE
2     FALSE      FALSE   FALSE    FALSE           FALSE            FALSE
  mrt.iv.obs mrt.iv.pred mrt.md.obs mrt.md.pred vz.obs vz.pred vz.int.inf.obs
1      FALSE       FALSE      FALSE       FALSE  FALSE   FALSE          FALSE
2      FALSE       FALSE      FALSE       FALSE  FALSE   FALSE          FALSE
  vz.int.inf.pred vz.iv.obs vz.iv.pred vz.sparse.last vss.obs vss.pred
1           FALSE     FALSE      FALSE          FALSE   FALSE    FALSE
2           FALSE     FALSE      FALSE          FALSE   FALSE    FALSE
  vss.iv.obs vss.iv.pred vss.md.obs vss.md.pred vss.int.inf.obs
1      FALSE       FALSE      FALSE       FALSE           FALSE
2      FALSE       FALSE      FALSE       FALSE           FALSE
  vss.int.inf.pred cav.int.inf.obs cav.int.inf.pred thalf.eff.obs
1            FALSE           FALSE            FALSE         FALSE
2            FALSE           FALSE            FALSE         FALSE
  thalf.eff.pred thalf.eff.iv.obs thalf.eff.iv.pred kel.obs kel.pred kel.iv.obs
1          FALSE            FALSE             FALSE   FALSE    FALSE      FALSE
2          FALSE            FALSE             FALSE   FALSE    FALSE      FALSE
  kel.iv.pred kel.int.inf.obs kel.int.inf.pred auclast.dn aucall.dn
1       FALSE           FALSE            FALSE      FALSE     FALSE
2       FALSE           FALSE            FALSE      FALSE     FALSE
  aucinf.obs.dn aucinf.pred.dn aumclast.dn aumcall.dn aumcinf.obs.dn
1         FALSE          FALSE       FALSE      FALSE          FALSE
2         FALSE          FALSE       FALSE      FALSE          FALSE
  aumcinf.pred.dn cmax.dn cmin.dn clast.obs.dn clast.pred.dn cav.dn ctrough.dn
1           FALSE   FALSE   FALSE        FALSE         FALSE  FALSE      FALSE
2           FALSE   FALSE   FALSE        FALSE         FALSE  FALSE      FALSE
  clr.last.dn clr.obs.dn clr.pred.dn
1       FALSE      FALSE       FALSE
2       FALSE      FALSE       FALSE

The two default rows are:

  • Row 1 (end = 24): calculates auclast only — the workhorse for most single-dose studies.
  • Row 2 (end = Inf): calculates cmax, tmax, half.life, and aucinf.obs.

These defaults are suitable for a single-dose extravascular study with at least 24 hours of sampling. For any other design (multiple dose, IV, urine, etc.) you should supply explicit intervals.

d_dose <- PKNCAdose(
  Theoph |> group_by(Subject) |>
    summarise(Dose = Dose[1] * Wt[1], .groups = "drop") |>
    mutate(Time = 0),
  Dose ~ Time | Subject
)

# No intervals argument — uses PKNCA.options("single.dose.aucs") automatically
d_data_default <- PKNCAdata(
  PKNCAconc(Theoph, conc ~ Time | Subject),
  d_dose
)
d_data_default$intervals
# A tibble: 24 × 204
   start   end auclast aucall aumclast aumcall aucint.last aucint.last.dose
   <dbl> <dbl> <lgl>   <lgl>  <lgl>    <lgl>   <lgl>       <lgl>           
 1     0    24 TRUE    FALSE  FALSE    FALSE   FALSE       FALSE           
 2     0   Inf FALSE   FALSE  FALSE    FALSE   FALSE       FALSE           
 3     0    24 TRUE    FALSE  FALSE    FALSE   FALSE       FALSE           
 4     0   Inf FALSE   FALSE  FALSE    FALSE   FALSE       FALSE           
 5     0    24 TRUE    FALSE  FALSE    FALSE   FALSE       FALSE           
 6     0   Inf FALSE   FALSE  FALSE    FALSE   FALSE       FALSE           
 7     0    24 TRUE    FALSE  FALSE    FALSE   FALSE       FALSE           
 8     0   Inf FALSE   FALSE  FALSE    FALSE   FALSE       FALSE           
 9     0    24 TRUE    FALSE  FALSE    FALSE   FALSE       FALSE           
10     0   Inf FALSE   FALSE  FALSE    FALSE   FALSE       FALSE           
# ℹ 14 more rows
# ℹ 196 more variables: aucint.all <lgl>, aucint.all.dose <lgl>,
#   aumcint.last <lgl>, aumcint.last.dose <lgl>, aumcint.all <lgl>,
#   aumcint.all.dose <lgl>, c0 <lgl>, cmax <lgl>, cmin <lgl>, tmax <lgl>,
#   tmin <lgl>, tlast <lgl>, tfirst <lgl>, clast.obs <lgl>, cl.last <lgl>,
#   cl.all <lgl>, cl.int.all <lgl>, cl.int.last <lgl>, f <lgl>, mrt.last <lgl>,
#   mrt.all <lgl>, mrt.int.all <lgl>, mrt.int.last <lgl>, mrt.iv.last <lgl>, …

3.4 4. Multiple Intervals per Group

Each row of the interval data frame is applied independently. A single subject (or group) can have any number of interval rows, each with its own time window and parameter set. PKNCA applies every matching row and collects the results.

# Two windows for the same subjects:
# 0–24 h for early exposure; 0–Inf for terminal parameters
multi_intervals <- data.frame(
  start      = c(0, 0),
  end        = c(24, Inf),
  auclast    = c(TRUE,  FALSE),
  cmax       = c(FALSE, TRUE),
  half.life  = c(FALSE, TRUE),
  aucinf.obs = c(FALSE, TRUE)
)
multi_intervals
  start end auclast  cmax half.life aucinf.obs
1     0  24    TRUE FALSE     FALSE      FALSE
2     0 Inf   FALSE  TRUE      TRUE       TRUE

PKNCA processes each row separately: the first row restricts data to \(t \in [0, 24]\) for the auclast calculation, while the second row uses all available data to derive terminal parameters.

Overlapping intervals are allowed and do not interfere with each other.


3.5 5. Duration-Based Events

Some sampling designs record a duration rather than an instantaneous sample — for example, urine collection periods or IV infusions. PKNCA tracks these via the duration argument in PKNCAconc() and PKNCAdose().

When a concentration object carries duration information, PKNCA selects samples for an interval based on both the start and end of the collection period. The collection end time must fall at or before the interval end for the sample to be included:

# Urine example: each row covers a collection period
urine_conc <- data.frame(
  Subject  = rep(1, 4),
  Time     = c(0,  4,  8,  24),   # collection start times
  duration = c(4,  4,  16, 0),    # collection lengths (hours)
  conc     = c(0.5, 1.2, 0.9, 0.3)
)

d_urine_conc <- PKNCAconc(
  urine_conc,
  conc ~ Time | Subject,
  duration = "duration"
)

# The interval end must align with a collection end time
urine_intervals <- data.frame(
  start    = 0,
  end      = 24,   # matches the end of the 8-h collection (8 + 16 = 24)
  ae       = TRUE,
  clr.last = TRUE
)

For IV infusions, setDuration() on the dose object sets the infusion duration, and ceoi (concentration at end of infusion) becomes calculable within an interval whose end matches the infusion end time.


3.6 6. Full Parameter Catalogue

The complete list of calculable parameters is available programmatically via get.interval.cols(). Each entry carries a description, the calculation function, unit type, and dependency information.

cols <- get.interval.cols()

param_table <- data.frame(
  parameter   = names(cols),
  description = sapply(cols, function(x) x$desc),
  stringsAsFactors = FALSE
)

# Exclude the structural columns start/end from the display
param_table <- param_table[!param_table$parameter %in% c("start", "end"), ]
rownames(param_table) <- NULL

knitr::kable(
  param_table,
  col.names = c("Parameter", "Description"),
  caption   = paste0(
    "All ", nrow(param_table),
    " calculable parameters in PKNCA ", packageVersion("PKNCA")
  )
)
All 201 calculable parameters in PKNCA 0.12.2
Parameter Description
auclast The area under the concentration time curve from the beginning of the interval to the last concentration above the limit of quantification
aucall The area under the concentration time curve from the beginning of the interval to the last concentration above the limit of quantification plus the triangle from that last concentration to 0 at the first concentration below the limit of quantification
aumclast The area under the concentration time moment curve from the beginning of the interval to the last concentration above the limit of quantification
aumcall The area under the concentration time moment curve from the beginning of the interval to the last concentration above the limit of quantification plus the moment of the triangle from that last concentration to 0 at the first concentration below the limit of quantification
aucint.last The area under the concentration time curve in the interval extrapolating from Tlast to infinity with zeros (matching AUClast)
aucint.last.dose The area under the concentration time curve in the interval extrapolating from Tlast to infinity with zeros (matching AUClast) with dose-aware interpolation/extrapolation of concentrations
aucint.all The area under the concentration time curve in the interval extrapolating from Tlast to infinity with the triangle from Tlast to the next point and zero thereafter (matching AUCall)
aucint.all.dose The area under the concentration time curve in the interval extrapolating from Tlast to infinity with the triangle from Tlast to the next point and zero thereafter (matching AUCall) with dose-aware interpolation/extrapolation of concentrations
aumcint.last The area under the moment curve in the interval extrapolating from Tlast to infinity with zeros (matching AUMClast)
aumcint.last.dose The area under the moment curve in the interval extrapolating from Tlast to infinity with zeros (matching AUMClast) with dose-aware interpolation/extrapolation of concentrations
aumcint.all The area under the moment curve in the interval extrapolating from Tlast to infinity with the triangle from Tlast to the next point and zero thereafter (matching AUMCall)
aumcint.all.dose The area under the moment curve in the interval extrapolating from Tlast to infinity with the triangle from Tlast to the next point and zero thereafter (matching AUMCall) with dose-aware interpolation/extrapolation of concentrations
c0 Initial concentration after an IV bolus
cmax Maximum observed concentration
cmin Minimum observed concentration
tmax Time of the maximum observed concentration
tmin Time of the minimum observed concentration
tlast Time of the last concentration observed above the limit of quantification
tfirst Time of the first concentration above the limit of quantification
clast.obs The last concentration observed above the limit of quantification
cl.last Clearance or observed oral clearance calculated to Clast
cl.all Clearance or observed oral clearance calculated with AUCall
cl.int.all Clearance or observed oral clearance calculated with AUCint.all
cl.int.last Clearance or observed oral clearance calculated with AUCint.last
f Bioavailability or relative bioavailability
mrt.last The mean residence time to the last observed concentration above the LOQ
mrt.all Mean residence time calculated with AUCall/AUMCall
mrt.int.all Mean residence time over interval calculated with AUCint.all/AUMCint.all
mrt.int.last Mean residence time over interval calculated with AUCint.last/AUMCint.last
mrt.iv.last The mean residence time to the last observed concentration above the LOQ correcting for dosing duration
vss.last The steady-state volume of distribution calculating through Tlast
vss.iv.last The steady-state volume of distribution with intravenous infusion calculating through Tlast
vss.all Steady-state volume of distribution calculated with AUCall-based CL and MRT
vss.int.all Steady-state volume of distribution using interval AUCint.all
vss.int.last Steady-state volume of distribution using interval AUCint.last
cav The average concentration during an interval (calculated with AUClast)
cav.int.last The average concentration during an interval (calculated with AUCint.last)
cav.int.all The average concentration during an interval (calculated with AUCint.all)
ctrough The trough (end of interval) concentration
cstart The predose concentration
ptr Peak-to-Trough ratio (fraction)
tlag Lag time
deg.fluc Degree of fluctuation
swing Swing relative to Cmin
ceoi Concentration at the end of infusion
aucabove.predose.all The area under the concentration time the beginning of the interval to the last concentration above the limit of quantification plus the triangle from that last concentration to 0 at the first concentration below the limit of quantification, with a concentration subtracted from all concentrations and values below zero after subtraction set to zero
aucabove.trough.all The area under the concentration time the beginning of the interval to the last concentration above the limit of quantification plus the triangle from that last concentration to 0 at the first concentration below the limit of quantification, with a concentration subtracted from all concentrations and values below zero after subtraction set to zero
count_conc Number of non-missing concentrations for an interval
count_conc_measured Number of measured and non BLQ/ALQ concentrations for an interval
totdose Total dose administered during an interval
volpk The sum of urine volumes for the interval
ae The amount excreted (typically into urine or feces)
clr.last The renal clearance calculated using AUClast
clr.obs The renal clearance calculated using AUCinf,obs
clr.pred The renal clearance calculated using AUCinf,pred
fe The fraction of the dose excreted
ertlst The midpoint collection time of the last measurable excretion rate (typically in urine or feces)
ermax The maximum excretion rate (typically in urine or feces)
ertmax The midpoint collection time of the maximum excretion rate (typically in urine or feces)
sparse_auclast For sparse PK sampling, the area under the concentration time curve from the beginning of the interval to the last concentration above the limit of quantification
sparse_auc_se For sparse PK sampling, the standard error of the area under the concentration time curve from the beginning of the interval to the last concentration above the limit of quantification
sparse_auc_df For sparse PK sampling, the standard error degrees of freedom of the area under the concentration time curve from the beginning of the interval to the last concentration above the limit of quantification
sparse_aumclast For sparse PK sampling, the area under the moment curve from the beginning of the interval to the last concentration above the limit of quantification
sparse_aumc_se For sparse PK sampling, the standard error of the area under the moment curve
sparse_aumc_df For sparse PK sampling, the degrees of freedom for the AUMC variance estimate
time_above Time above a given concentration
aucivlast The AUClast calculated with back-extrapolation for intravenous dosing using extrapolated C0
aucivall The AUCall calculated with back-extrapolation for intravenous dosing using extrapolated C0
aucivint.last The AUCint,last calculated with back-extrapolation for intravenous dosing using extrapolated C0
aucivint.all The AUCint,all calculated with back-extrapolation for intravenous dosing using extrapolated C0
aucivpbextlast The back-extrapolation percent for intravenous dosing based on AUClast
aucivpbextall The back-extrapolation percent for intravenous dosing based on AUCall
aucivpbextint.last The back-extrapolation percent for intravenous dosing based on AUCint,last
aucivpbextint.all The back-extrapolation percent for intravenous dosing based on AUCint,all
aumcivlast The AUMClast calculated with back-extrapolation for intravenous dosing using extrapolated C0
aumcivall The AUMCall calculated with back-extrapolation for intravenous dosing using extrapolated C0
aumcivint.last The AUMCint,last calculated with back-extrapolation for intravenous dosing using extrapolated C0
aumcivint.all The AUMCint,all calculated with back-extrapolation for intravenous dosing using extrapolated C0
half.life The (terminal) half-life
r.squared The r^2 value of the half-life calculation
adj.r.squared The adjusted r^2 value of the half-life calculation
lambda.z.corrxy Correlation between time and log-concentration for lambda.z points
lambda.z The elimination rate of the terminal half-life
lambda.z.time.first The first time point used for the calculation of half-life
lambda.z.time.last The last time point used for the calculation of half-life
lambda.z.n.points The number of points used for the calculation of half-life
clast.pred The concentration at Tlast as predicted by the half-life
span.ratio The ratio of the half-life to the duration used for half-life calculation
tobit_residual The estimated residual standard deviation (on the log-concentration scale) from the Tobit half-life fit
adj_tobit_residual The adjusted Tobit residual standard deviation (analogous to adjusted r-squared; penalizes smaller windows)
lambda.z.n.points_blq The number of BLQ points included in the Tobit half-life calculation
thalf.eff.last The effective half-life (as determined from the MRTlast)
thalf.eff.iv.last The effective half-life (as determined from the intravenous MRTlast)
kel.last Elimination rate (as calculated from the MRT using AUClast)
kel.iv.last Elimination rate (as calculated from the intravenous MRTlast)
kel.all Elimination rate (as calculated from the MRTall)
kel.int.all Elimination rate (as calculated from the MRTint.all)
kel.int.last Elimination rate (as calculated from the MRTint.last)
cl.iv.all Clearance for intravenous dosing calculated with AUCall
cl.iv.last Clearance for intravenous dosing calculated with AUClast
cl.ivint.all Clearance for intravenous dosing calculated with interval AUCint.all
cl.ivint.last Clearance for intravenous dosing calculated with interval AUCint.last
cl.sparse.last Clearance from sparse sampling calculated with population AUClast
mrt.sparse.last Mean residence time from sparse sampling
mrt.iv.all Mean residence time for IV dosing calculated with AUCall/AUMCall
mrt.ivint.all Mean residence time for IV interval calculated with AUCint.all/AUMCint.all
mrt.ivint.last Mean residence time for IV interval calculated with AUCint.last/AUMCint.last
vz.all Terminal volume of distribution calculated with AUCall-based CL
vz.int.all Terminal volume of distribution using interval AUCint.all
vz.int.last Terminal volume of distribution using interval AUCint.last
vz.iv.all Terminal volume of distribution for IV dosing using AUCall
vz.iv.last Terminal volume of distribution for IV dosing using AUClast
vz.ivint.all Terminal volume of distribution for IV interval using AUCint.all
vz.ivint.last Terminal volume of distribution for IV interval using AUCint.last
vz.last Terminal volume of distribution calculated with AUClast-based CL
vss.iv.all Steady-state volume of distribution for IV dosing using AUCall
vss.ivint.all Steady-state volume of distribution for IV interval using AUCint.all
vss.ivint.last Steady-state volume of distribution for IV interval using AUCint.last
vss.sparse.last Steady-state volume of distribution from sparse sampling
aucinf.obs The area under the concentration time curve from the beginning of the interval to infinity with extrapolation to infinity from the observed Clast
aucinf.pred The area under the concentration time curve from the beginning of the interval to infinity with extrapolation to infinity from the predicted Clast
aumcinf.obs The area under the concentration time moment curve from the beginning of the interval to infinity with extrapolation to infinity from the observed Clast
aumcinf.pred The area under the concentration time moment curve from the beginning of the interval to infinity with extrapolation to infinity from the predicted Clast
aucint.inf.obs The area under the concentration time curve in the interval extrapolating from Tlast to infinity with zeros (matching AUClast)
aucint.inf.obs.dose The area under the concentration time curve in the interval extrapolating from Tlast to infinity with zeros (matching AUClast) with dose-aware interpolation/extrapolation of concentrations
aucint.inf.pred The area under the concentration time curve in the interval extrapolating from Tlast to infinity with the triangle from Tlast to the next point and zero thereafter (matching AUCall)
aucint.inf.pred.dose The area under the concentration time curve in the interval extrapolating from Tlast to infinity with the triangle from Tlast to the next point and zero thereafter (matching AUCall) with dose-aware interpolation/extrapolation of concentrations
aumcint.inf.obs The area under the moment curve in the interval extrapolating from Tlast to infinity with zeros (matching AUMClast)
aumcint.inf.obs.dose The area under the moment curve in the interval extrapolating from Tlast to infinity with zeros (matching AUMClast) with dose-aware interpolation/extrapolation of concentrations
aumcint.inf.pred The area under the moment curve in the interval extrapolating from Tlast to infinity with the triangle from Tlast to the next point and zero thereafter (matching AUMCall)
aumcint.inf.pred.dose The area under the moment curve in the interval extrapolating from Tlast to infinity with the triangle from Tlast to the next point and zero thereafter (matching AUMCall) with dose-aware interpolation/extrapolation of concentrations
aucivinf.obs The AUCinf,obs calculated with back-extrapolation for intravenous dosing using extrapolated C0
aucivinf.pred The AUCinf,pred calculated with back-extrapolation for intravenous dosing using extrapolated C0
aucivpbextinf.obs The back-extrapolation percent for intravenous dosing based on AUCinf,obs
aucivpbextinf.pred The back-extrapolation percent for intravenous dosing based on AUCinf,pred
aumcivinf.obs The AUMCinf,obs calculated with back-extrapolation for intravenous dosing using extrapolated C0
aumcivinf.pred The AUMCinf,pred calculated with back-extrapolation for intravenous dosing using extrapolated C0
aucpext.obs Percent of the AUCinf that is extrapolated after Tlast calculated from the observed Clast
aucpext.pred Percent of the AUCinf that is extrapolated after Tlast calculated from the predicted Clast
kel.iv.all Elimination rate (as calculated from the MRTiv.all))
kel.ivint.all Elimination rate (as calculated from the MRTivint.all)
kel.ivint.last Elimination rate (as calculated from the MRTivint.last)
kel.sparse.last Elimination rate (as calculated from the MRTsparse.last)
cl.obs Clearance or observed oral clearance calculated with observed Clast
cl.pred Clearance or observed oral clearance calculated with predicted Clast
cl.int.inf.obs Clearance or observed oral clearance calculated with AUCint.inf.obs
cl.int.inf.pred Clearance or observed oral clearance calculated with AUCint.inf.pred
cl.iv.obs Clearance for intravenous dosing calculated with AUCinf,obs
cl.iv.pred Clearance for intravenous dosing calculated with AUCinf,pred
mrt.obs The mean residence time to infinity using observed Clast
mrt.pred The mean residence time to infinity using predicted Clast
mrt.int.inf.obs Mean residence time over interval calculated with AUCint.inf.obs/AUMCint.inf.obs
mrt.int.inf.pred Mean residence time over interval calculated with AUCint.inf.pred/AUMCint.inf.pred
mrt.iv.obs The mean residence time to infinity using observed Clast correcting for dosing duration
mrt.iv.pred The mean residence time to infinity using predicted Clast correcting for dosing duration
mrt.md.obs The mean residence time with multiple dosing and nonlinear kinetics using observed Clast
mrt.md.pred The mean residence time with multiple dosing and nonlinear kinetics using predicted Clast
vz.obs The terminal volume of distribution using observed Clast
vz.pred The terminal volume of distribution using predicted Clast
vz.int.inf.obs Terminal volume of distribution using interval AUCint.inf.obs
vz.int.inf.pred Terminal volume of distribution using interval AUCint.inf.pred
vz.iv.obs Terminal volume of distribution for IV dosing using observed AUCinf
vz.iv.pred Terminal volume of distribution for IV dosing using predicted AUCinf
vz.sparse.last Terminal volume of distribution from sparse sampling
vss.obs The steady-state volume of distribution using observed Clast
vss.pred The steady-state volume of distribution using predicted Clast
vss.iv.obs The steady-state volume of distribution with intravenous infusion using observed Clast
vss.iv.pred The steady-state volume of distribution with intravenous infusion using predicted Clast
vss.md.obs The steady-state volume of distribution for nonlinear multiple-dose data using observed Clast
vss.md.pred The steady-state volume of distribution for nonlinear multiple-dose data using predicted Clast
vss.int.inf.obs Steady-state volume of distribution using interval AUCint.inf.obs
vss.int.inf.pred Steady-state volume of distribution using interval AUCint.inf.pred
cav.int.inf.obs The average concentration during an interval (calculated with AUCint.inf.obs)
cav.int.inf.pred The average concentration during an interval (calculated with AUCint.inf.pred)
thalf.eff.obs The effective half-life (as determined from the MRTobs)
thalf.eff.pred The effective half-life (as determined from the MRTpred)
thalf.eff.iv.obs The effective half-life (as determined from the intravenous MRTobs)
thalf.eff.iv.pred The effective half-life (as determined from the intravenous MRTpred)
kel.obs Elimination rate (as calculated from the MRT with observed Clast)
kel.pred Elimination rate (as calculated from the MRT with predicted Clast)
kel.iv.obs Elimination rate (as calculated from the intravenous MRTobs)
kel.iv.pred Elimination rate (as calculated from the intravenous MRTpred)
kel.int.inf.obs Elimination rate (as calculated from the MRTint.inf.obs)
kel.int.inf.pred Elimination rate (as calculated from the MRTint.inf.pred)
auclast.dn Dose normalized auclast
aucall.dn Dose normalized aucall
aucinf.obs.dn Dose normalized aucinf.obs
aucinf.pred.dn Dose normalized aucinf.pred
aumclast.dn Dose normalized aumclast
aumcall.dn Dose normalized aumcall
aumcinf.obs.dn Dose normalized aumcinf.obs
aumcinf.pred.dn Dose normalized aumcinf.pred
cmax.dn Dose normalized cmax
cmin.dn Dose normalized cmin
clast.obs.dn Dose normalized clast.obs
clast.pred.dn Dose normalized clast.pred
cav.dn Dose normalized cav
ctrough.dn Dose normalized ctrough
clr.last.dn Dose normalized clr.last
clr.obs.dn Dose normalized clr.obs
clr.pred.dn Dose normalized clr.pred

Parameters fall into broad families:

  • AUC / AUMCauclast, aucall, aucinf.obs, aucinf.pred, aumclast, and interval-restricted aucint.* variants
  • Concentrationcmax, cmin, ctrough, clast.obs, clast.pred, c0, cstart, ceoi
  • Timetmax, tlast, tfirst, tlag
  • Clearance / Volumecl.obs, cl.pred, vz.obs, vz.pred, vss.obs, vss.iv.obs, renal clr.*
  • Eliminationhalf.life, lambda.z, lambda.z.n.points, span.ratio, r.squared, adj.r.squared
  • Excretionae, fe
  • Steady-state / MDdeg.fluc, swing, ptr, cav, mrt.*, thalf.eff.*
  • Sparse samplingsparse_auclast, sparse_auc_se, sparse_auc_df
  • IV-specificaucivlast, aucivpbext*, aucivinf.*
  • Dose-normalizedauclast.dn, cmax.dn, and other *.dn variants

3.7 7. Checking Parameter Dependencies with get.parameter.deps()

Some parameters depend on others being computed first. get.parameter.deps() returns all parameters that use a given parameter as an input:

# Which parameters depend on auclast?
get.parameter.deps("auclast")
 [1] "aucivlast"         "aucivpbextlast"    "auclast"          
 [4] "auclast.dn"        "aucpext.obs"       "aucpext.pred"     
 [7] "cav"               "cav.dn"            "cl.iv.last"       
[10] "cl.last"           "deg.fluc"          "kel.iv.last"      
[13] "kel.last"          "mrt.iv.last"       "mrt.last"         
[16] "mrt.md.obs"        "mrt.md.pred"       "thalf.eff.iv.last"
[19] "thalf.eff.last"    "vss.iv.last"       "vss.last"         
[22] "vss.md.obs"        "vss.md.pred"       "vz.iv.last"       
[25] "vz.last"          

This is useful when you enable a high-level parameter and want to know which intermediate quantities will also be computed. Dependencies are resolved automatically — you do not need to set dependency flags to TRUE manually.


3.8 8. Validating Custom Intervals with check.interval.specification()

Before passing intervals to PKNCAdata(), you can validate them with check.interval.specification(). It verifies that all column names are recognized parameters, that start < end, and that logical values are used correctly.

# A valid interval
valid_int <- data.frame(
  start      = c(0, 0),
  end        = c(24, Inf),
  auclast    = c(TRUE, FALSE),
  aucinf.obs = c(FALSE, TRUE),
  cmax       = c(FALSE, TRUE)
)
check.interval.specification(valid_int)
  start end auclast aucall aumclast aumcall aucint.last aucint.last.dose
1     0  24    TRUE  FALSE    FALSE   FALSE       FALSE            FALSE
2     0 Inf   FALSE  FALSE    FALSE   FALSE       FALSE            FALSE
  aucint.all aucint.all.dose aumcint.last aumcint.last.dose aumcint.all
1      FALSE           FALSE        FALSE             FALSE       FALSE
2      FALSE           FALSE        FALSE             FALSE       FALSE
  aumcint.all.dose    c0  cmax  cmin  tmax  tmin tlast tfirst clast.obs cl.last
1            FALSE FALSE FALSE FALSE FALSE FALSE FALSE  FALSE     FALSE   FALSE
2            FALSE FALSE  TRUE FALSE FALSE FALSE FALSE  FALSE     FALSE   FALSE
  cl.all cl.int.all cl.int.last     f mrt.last mrt.all mrt.int.all mrt.int.last
1  FALSE      FALSE       FALSE FALSE    FALSE   FALSE       FALSE        FALSE
2  FALSE      FALSE       FALSE FALSE    FALSE   FALSE       FALSE        FALSE
  mrt.iv.last vss.last vss.iv.last vss.all vss.int.all vss.int.last   cav
1       FALSE    FALSE       FALSE   FALSE       FALSE        FALSE FALSE
2       FALSE    FALSE       FALSE   FALSE       FALSE        FALSE FALSE
  cav.int.last cav.int.all ctrough cstart   ptr  tlag deg.fluc swing  ceoi
1        FALSE       FALSE   FALSE  FALSE FALSE FALSE    FALSE FALSE FALSE
2        FALSE       FALSE   FALSE  FALSE FALSE FALSE    FALSE FALSE FALSE
  aucabove.predose.all aucabove.trough.all count_conc count_conc_measured
1                FALSE               FALSE      FALSE               FALSE
2                FALSE               FALSE      FALSE               FALSE
  totdose volpk    ae clr.last clr.obs clr.pred    fe ertlst ermax ertmax
1   FALSE FALSE FALSE    FALSE   FALSE    FALSE FALSE  FALSE FALSE  FALSE
2   FALSE FALSE FALSE    FALSE   FALSE    FALSE FALSE  FALSE FALSE  FALSE
  sparse_auclast sparse_auc_se sparse_auc_df sparse_aumclast sparse_aumc_se
1          FALSE         FALSE         FALSE           FALSE          FALSE
2          FALSE         FALSE         FALSE           FALSE          FALSE
  sparse_aumc_df time_above aucivlast aucivall aucivint.last aucivint.all
1          FALSE      FALSE     FALSE    FALSE         FALSE        FALSE
2          FALSE      FALSE     FALSE    FALSE         FALSE        FALSE
  aucivpbextlast aucivpbextall aucivpbextint.last aucivpbextint.all aumcivlast
1          FALSE         FALSE              FALSE             FALSE      FALSE
2          FALSE         FALSE              FALSE             FALSE      FALSE
  aumcivall aumcivint.last aumcivint.all half.life r.squared adj.r.squared
1     FALSE          FALSE         FALSE     FALSE     FALSE         FALSE
2     FALSE          FALSE         FALSE     FALSE     FALSE         FALSE
  lambda.z.corrxy lambda.z lambda.z.time.first lambda.z.time.last
1           FALSE    FALSE               FALSE              FALSE
2           FALSE    FALSE               FALSE              FALSE
  lambda.z.n.points clast.pred span.ratio tobit_residual adj_tobit_residual
1             FALSE      FALSE      FALSE          FALSE              FALSE
2             FALSE      FALSE      FALSE          FALSE              FALSE
  lambda.z.n.points_blq thalf.eff.last thalf.eff.iv.last kel.last kel.iv.last
1                 FALSE          FALSE             FALSE    FALSE       FALSE
2                 FALSE          FALSE             FALSE    FALSE       FALSE
  kel.all kel.int.all kel.int.last cl.iv.all cl.iv.last cl.ivint.all
1   FALSE       FALSE        FALSE     FALSE      FALSE        FALSE
2   FALSE       FALSE        FALSE     FALSE      FALSE        FALSE
  cl.ivint.last cl.sparse.last mrt.sparse.last mrt.iv.all mrt.ivint.all
1         FALSE          FALSE           FALSE      FALSE         FALSE
2         FALSE          FALSE           FALSE      FALSE         FALSE
  mrt.ivint.last vz.all vz.int.all vz.int.last vz.iv.all vz.iv.last
1          FALSE  FALSE      FALSE       FALSE     FALSE      FALSE
2          FALSE  FALSE      FALSE       FALSE     FALSE      FALSE
  vz.ivint.all vz.ivint.last vz.last vss.iv.all vss.ivint.all vss.ivint.last
1        FALSE         FALSE   FALSE      FALSE         FALSE          FALSE
2        FALSE         FALSE   FALSE      FALSE         FALSE          FALSE
  vss.sparse.last aucinf.obs aucinf.pred aumcinf.obs aumcinf.pred
1           FALSE      FALSE       FALSE       FALSE        FALSE
2           FALSE       TRUE       FALSE       FALSE        FALSE
  aucint.inf.obs aucint.inf.obs.dose aucint.inf.pred aucint.inf.pred.dose
1          FALSE               FALSE           FALSE                FALSE
2          FALSE               FALSE           FALSE                FALSE
  aumcint.inf.obs aumcint.inf.obs.dose aumcint.inf.pred aumcint.inf.pred.dose
1           FALSE                FALSE            FALSE                 FALSE
2           FALSE                FALSE            FALSE                 FALSE
  aucivinf.obs aucivinf.pred aucivpbextinf.obs aucivpbextinf.pred aumcivinf.obs
1        FALSE         FALSE             FALSE              FALSE         FALSE
2        FALSE         FALSE             FALSE              FALSE         FALSE
  aumcivinf.pred aucpext.obs aucpext.pred kel.iv.all kel.ivint.all
1          FALSE       FALSE        FALSE      FALSE         FALSE
2          FALSE       FALSE        FALSE      FALSE         FALSE
  kel.ivint.last kel.sparse.last cl.obs cl.pred cl.int.inf.obs cl.int.inf.pred
1          FALSE           FALSE  FALSE   FALSE          FALSE           FALSE
2          FALSE           FALSE  FALSE   FALSE          FALSE           FALSE
  cl.iv.obs cl.iv.pred mrt.obs mrt.pred mrt.int.inf.obs mrt.int.inf.pred
1     FALSE      FALSE   FALSE    FALSE           FALSE            FALSE
2     FALSE      FALSE   FALSE    FALSE           FALSE            FALSE
  mrt.iv.obs mrt.iv.pred mrt.md.obs mrt.md.pred vz.obs vz.pred vz.int.inf.obs
1      FALSE       FALSE      FALSE       FALSE  FALSE   FALSE          FALSE
2      FALSE       FALSE      FALSE       FALSE  FALSE   FALSE          FALSE
  vz.int.inf.pred vz.iv.obs vz.iv.pred vz.sparse.last vss.obs vss.pred
1           FALSE     FALSE      FALSE          FALSE   FALSE    FALSE
2           FALSE     FALSE      FALSE          FALSE   FALSE    FALSE
  vss.iv.obs vss.iv.pred vss.md.obs vss.md.pred vss.int.inf.obs
1      FALSE       FALSE      FALSE       FALSE           FALSE
2      FALSE       FALSE      FALSE       FALSE           FALSE
  vss.int.inf.pred cav.int.inf.obs cav.int.inf.pred thalf.eff.obs
1            FALSE           FALSE            FALSE         FALSE
2            FALSE           FALSE            FALSE         FALSE
  thalf.eff.pred thalf.eff.iv.obs thalf.eff.iv.pred kel.obs kel.pred kel.iv.obs
1          FALSE            FALSE             FALSE   FALSE    FALSE      FALSE
2          FALSE            FALSE             FALSE   FALSE    FALSE      FALSE
  kel.iv.pred kel.int.inf.obs kel.int.inf.pred auclast.dn aucall.dn
1       FALSE           FALSE            FALSE      FALSE     FALSE
2       FALSE           FALSE            FALSE      FALSE     FALSE
  aucinf.obs.dn aucinf.pred.dn aumclast.dn aumcall.dn aumcinf.obs.dn
1         FALSE          FALSE       FALSE      FALSE          FALSE
2         FALSE          FALSE       FALSE      FALSE          FALSE
  aumcinf.pred.dn cmax.dn cmin.dn clast.obs.dn clast.pred.dn cav.dn ctrough.dn
1           FALSE   FALSE   FALSE        FALSE         FALSE  FALSE      FALSE
2           FALSE   FALSE   FALSE        FALSE         FALSE  FALSE      FALSE
  clr.last.dn clr.obs.dn clr.pred.dn
1       FALSE      FALSE       FALSE
2       FALSE      FALSE       FALSE
# An invalid interval — start >= end
bad_int <- data.frame(
  start   = 24,
  end     = 0,
  auclast = TRUE
)
check.interval.specification(bad_int)
Error in `check.interval.specification()`:
! start must be < end

check.interval.specification() returns the interval data frame invisibly on success, making it safe to use inline before passing to PKNCAdata():

d_conc <- PKNCAconc(Theoph, conc ~ Time | Subject)
d_dose <- PKNCAdose(
  Theoph |> group_by(Subject) |>
    summarise(Dose = Dose[1] * Wt[1], .groups = "drop") |>
    mutate(Time = 0),
  Dose ~ Time | Subject
)

my_intervals <- check.interval.specification(
  data.frame(
    start      = c(0, 0),
    end        = c(24, Inf),
    auclast    = c(TRUE, FALSE),
    aucinf.obs = c(FALSE, TRUE),
    cmax       = c(FALSE, TRUE),
    half.life  = c(FALSE, TRUE)
  )
)

d_data <- PKNCAdata(d_conc, d_dose, intervals = my_intervals)
suppressMessages(o_nca <- pk.nca(d_data))
as.data.frame(o_nca) |> head(8)
# A tibble: 8 × 6
  Subject start   end PPTESTCD      PPORRES exclude
  <ord>   <dbl> <dbl> <chr>           <dbl> <chr>  
1 6           0    24 auclast       71.7    <NA>   
2 6           0   Inf cmax           6.44   <NA>   
3 6           0   Inf tmax           1.15   <NA>   
4 6           0   Inf tlast         23.8    <NA>   
5 6           0   Inf clast.obs      0.92   <NA>   
6 6           0   Inf lambda.z       0.0878 <NA>   
7 6           0   Inf r.squared      0.998  <NA>   
8 6           0   Inf adj.r.squared  0.998  <NA>