22  NCA Parameter Dependencies

PKNCA resolves parameter dependencies automatically: when you request aucinf.obs, PKNCA internally ensures lambda.z is computed first because aucinf.obs depends on it. These dependencies are declared at registration time — every NCA parameter is registered via add.interval.col() with a depends vector naming the parameters that must be computed before it, and the full registry is accessible via get.interval.cols(). The graph below makes the whole dependency network explicit.

22.1 Interactive dependency graph

# Get all registered interval columns (parameters)
cols <- get.interval.cols()

# Build edge list from the 'depends' field
edges <- lapply(names(cols), function(param) {
  deps <- cols[[param]]$depends
  if (length(deps) == 0) return(NULL)
  data.frame(from = deps, to = param, stringsAsFactors = FALSE)
}) |>
  bind_rows()

# All unique nodes
all_nodes <- unique(c(edges$from, edges$to, names(cols)))

# Assign category for coloring
categorize <- function(name) {
  case_when(
    grepl("^auc",       name) ~ "AUC",
    grepl("^lambda|half\\.life|r\\.squared", name) ~ "Half-life / λz",
    grepl("^cl\\.|^vz\\.|^vss", name) ~ "CL / Volume",
    grepl("^mrt",       name) ~ "MRT",
    grepl("^c(max|min|0|last|first)|^t(max|min|last|first|lag)|^clast", name) ~ "Cmax / Tmax",
    grepl("^f$|bioavail|^ae|^fe|^clr|^vd",  name) ~ "Bioavailability / Renal",
    grepl("^tss",       name) ~ "Steady-state",
    TRUE ~ "Other"
  )
}

category_colors <- c(
  "AUC"                    = "#4e79a7",
  "Half-life / λz"         = "#f28e2b",
  "CL / Volume"            = "#e15759",
  "MRT"                    = "#76b7b2",
  "Cmax / Tmax"            = "#59a14f",
  "Bioavailability / Renal"= "#edc948",
  "Steady-state"           = "#b07aa1",
  "Other"                  = "#aaaaaa"
)

nodes <- data.frame(
  id    = all_nodes,
  label = all_nodes,
  group = categorize(all_nodes),
  stringsAsFactors = FALSE
)

graph <- visNetwork(nodes, edges,
           width = "100%", height = "700px",
           main = "PKNCA NCA Parameter Dependencies") |>
  visNodes(shape = "dot", size = 14,
           font = list(size = 12),
           borderWidth = 2) |>
  visEdges(arrows = "to",
           color  = list(color = "#aaaaaa", highlight = "#333333"),
           smooth = list(type = "cubicBezier")) |>
  visOptions(
    highlightNearest = list(enabled = TRUE, degree = 2, hover = TRUE),
    nodesIdSelection = list(enabled = TRUE, main = "Select parameter")
  ) |>
  visLegend(useGroups = TRUE, position = "right") |>
  visPhysics(stabilization = list(iterations = 200)) |>
  visLayout(randomSeed = 42)

# Register each category as a visNetwork group: nodes and legend swatches both
# take their color from the group definition, so they always match
for (grp in names(category_colors)) {
  graph <- visGroups(graph, groupname = grp, color = category_colors[[grp]])
}
graph

How to use this graph:

  • Click a parameter node to highlight its immediate dependencies and dependents
  • The “Select parameter” dropdown jumps to a specific node
  • Drag nodes to rearrange; scroll to zoom
  • Colors indicate parameter family (see legend)

22.2 Dependency table

For a text-based reference:

dep_table <- lapply(names(cols), function(param) {
  data.frame(
    parameter = param,
    depends_on = if (length(cols[[param]]$depends) == 0) "(none)"
                 else paste(cols[[param]]$depends, collapse = ", "),
    stringsAsFactors = FALSE
  )
}) |>
  bind_rows() |>
  arrange(parameter)

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

22.3 Parameter-to-function mapping

Every interval parameter is computed by a function registered alongside it — usually named pk.calc.*() — and the registry entry returned by get.interval.cols() records that function name in its $FUN field, together with the parameter’s unit type and description. Where $FUN is NA, the parameter has no dedicated function: it is either produced as part of another function’s output (for example, r.squared and lambda.z.time.first are returned by the same half-life fit that produces half.life) or it is an interval boundary (start, end).

The table below is the complete index of the calculation API: every registered parameter, the function that computes it, its unit type, and its description. To add your own parameter to this registry, see the Writing Custom Parameters chapter and the vignette Writing PKNCA Parameter Functions.

cols <- get.interval.cols()

fun_map <- data.frame(
  parameter = names(cols),
  # $FUN is a character function name, or logical NA when the parameter has no
  # dedicated function; as.character() coerces both to character
  fun       = vapply(cols, function(x) as.character(x$FUN), character(1)),
  unit_type = vapply(cols, function(x) x$unit_type, character(1)),
  desc      = vapply(cols, function(x) x$desc, character(1)),
  stringsAsFactors = FALSE
) |>
  arrange(parameter)

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

22.4 Dependency resolution

When you call pk.nca(), PKNCA sorts the registry internally with PKNCA:::sort_interval_cols() (unexported) to produce a topologically sorted execution order — parameters with no dependencies run first, then those that depend on already-computed values.

# Count the direct dependencies of each parameter
cols <- get.interval.cols()
dep_counts <- sapply(cols, function(x) length(x$depends))
all_deps <- data.frame(
  parameter  = names(dep_counts),
  n_depends  = unname(dep_counts)
) |>
  arrange(n_depends, parameter)

cat(sprintf("%d parameters have no dependencies (base parameters).\n", sum(all_deps$n_depends == 0)))
37 parameters have no dependencies (base parameters).
cat(sprintf("%d parameters have at least one dependency (derived parameters).\n\n", sum(all_deps$n_depends > 0)))
166 parameters have at least one dependency (derived parameters).
# Show only derived parameters
all_deps |>
  filter(n_depends > 0) |>
  knitr::kable(
    col.names = c("Parameter", "N dependencies"),
    caption   = "Derived parameters ordered by number of direct dependencies"
  )
Derived parameters ordered by number of direct dependencies
Parameter N dependencies
adj.r.squared 1
adj_tobit_residual 1
aucabove.predose.all 1
aucabove.trough.all 1
aucall.dn 1
aucinf.obs.dn 1
aucinf.pred.dn 1
auclast.dn 1
aumcall.dn 1
aumcinf.obs.dn 1
aumcinf.pred.dn 1
aumclast.dn 1
cav 1
cav.dn 1
cav.int.all 1
cav.int.inf.obs 1
cav.int.inf.pred 1
cav.int.last 1
cl.all 1
cl.int.all 1
cl.int.inf.obs 1
cl.int.inf.pred 1
cl.int.last 1
cl.iv.all 1
cl.iv.last 1
cl.iv.obs 1
cl.iv.pred 1
cl.ivint.all 1
cl.ivint.last 1
cl.last 1
cl.obs 1
cl.pred 1
cl.sparse.last 1
clast.obs.dn 1
clast.pred 1
clast.pred.dn 1
clr.last 1
clr.last.dn 1
clr.obs 1
clr.obs.dn 1
clr.pred 1
clr.pred.dn 1
cmax.dn 1
cmin.dn 1
ctrough.dn 1
fe 1
kel.all 1
kel.int.all 1
kel.int.inf.obs 1
kel.int.inf.pred 1
kel.int.last 1
kel.iv.all 1
kel.iv.last 1
kel.iv.obs 1
kel.iv.pred 1
kel.ivint.all 1
kel.ivint.last 1
kel.last 1
kel.obs 1
kel.pred 1
kel.sparse.last 1
lambda.z 1
lambda.z.corrxy 1
lambda.z.n.points 1
lambda.z.n.points_blq 1
lambda.z.time.first 1
lambda.z.time.last 1
r.squared 1
span.ratio 1
sparse_auc_df 1
sparse_auc_se 1
sparse_aumc_df 1
sparse_aumc_se 1
sparse_aumclast 1
thalf.eff.iv.last 1
thalf.eff.iv.obs 1
thalf.eff.iv.pred 1
thalf.eff.last 1
thalf.eff.obs 1
thalf.eff.pred 1
tobit_residual 1
aucinf.obs 2
aucinf.pred 2
aucint.inf.obs 2
aucint.inf.obs.dose 2
aucint.inf.pred 2
aucint.inf.pred.dose 2
aucivall 2
aucivinf.obs 2
aucivinf.pred 2
aucivint.all 2
aucivint.last 2
aucivlast 2
aucivpbextall 2
aucivpbextinf.obs 2
aucivpbextinf.pred 2
aucivpbextint.all 2
aucivpbextint.last 2
aucivpbextlast 2
aucpext.obs 2
aucpext.pred 2
aumcinf.obs 2
aumcinf.pred 2
aumcint.inf.obs 2
aumcint.inf.obs.dose 2
aumcint.inf.pred 2
aumcint.inf.pred.dose 2
aumcivall 2
aumcivinf.obs 2
aumcivinf.pred 2
aumcivint.all 2
aumcivint.last 2
aumcivlast 2
half.life 2
mrt.all 2
mrt.int.all 2
mrt.int.inf.obs 2
mrt.int.inf.pred 2
mrt.int.last 2
mrt.iv.all 2
mrt.iv.last 2
mrt.iv.obs 2
mrt.iv.pred 2
mrt.ivint.all 2
mrt.ivint.last 2
mrt.last 2
mrt.obs 2
mrt.pred 2
mrt.sparse.last 2
ptr 2
swing 2
vss.all 2
vss.int.all 2
vss.int.inf.obs 2
vss.int.inf.pred 2
vss.int.last 2
vss.iv.all 2
vss.iv.last 2
vss.iv.obs 2
vss.iv.pred 2
vss.ivint.all 2
vss.ivint.last 2
vss.last 2
vss.md.obs 2
vss.md.pred 2
vss.obs 2
vss.pred 2
vss.sparse.last 2
vz.all 2
vz.int.all 2
vz.int.inf.obs 2
vz.int.inf.pred 2
vz.int.last 2
vz.iv.all 2
vz.iv.last 2
vz.iv.obs 2
vz.iv.pred 2
vz.ivint.all 2
vz.ivint.last 2
vz.last 2
vz.obs 2
vz.pred 2
vz.sparse.last 2
deg.fluc 3
mrt.md.obs 3
mrt.md.pred 3

22.5 Querying dependents: get.parameter.deps()

get.parameter.deps() is the reverse lookup: given a parameter name, it returns that parameter and every parameter downstream of it — the ones whose results would be affected if you excluded or modified it.

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"