28  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. It shows depends only: a secondary parameter’s inputs from its reference interval (declared with pknca_ref() in its formalsmap, such as the auclast that ratio.auclast reads from the reference interval) are not edges here.

28.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|^kel", 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\\.|^ratio\\.|^ae|^fe|^clr|^er|^volpk", name) ~ "Secondary / Excretion",
    grepl("^tss",       name) ~ "Steady-state",
    TRUE ~ "Other"
  )
}

category_colors <- c(
  "AUC"                    = "#4e79a7",
  "Half-life / λz"         = "#f28e2b",
  "CL / Volume"            = "#e15759",
  "MRT"                    = "#76b7b2",
  "Cmax / Tmax"            = "#59a14f",
  "Secondary / Excretion"  = "#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)

28.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
aucall_df aucall
aucall_se aucall
aucinf.obs lambda.z, clast.obs
aucinf.obs.dn aucinf.obs
aucinf.obs_df aucinf.obs
aucinf.obs_se aucinf.obs
aucinf.pred lambda.z, clast.pred
aucinf.pred.dn aucinf.pred
aucint.all (none)
aucint.inf.obs lambda.z, clast.obs
aucint.inf.pred lambda.z, clast.pred
aucint.last (none)
aucivall aucall, c0
aucivall_df aucivall
aucivall_se aucivall
aucivinf.obs aucinf.obs, c0, lambda.z, clast.obs
aucivinf.obs_df aucivinf.obs
aucivinf.obs_se aucivinf.obs
aucivinf.pred aucinf.pred, c0, lambda.z, clast.pred
aucivint.all aucint.all, c0
aucivint.last aucint.last, c0
aucivlast auclast, c0
aucivlast_df aucivlast
aucivlast_se aucivlast
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
auclast_df auclast
auclast_se auclast
aucpext.obs auclast, aucinf.obs
aucpext.pred auclast, aucinf.pred
aumcall (none)
aumcall.dn aumcall
aumcall_df aumcall
aumcall_se aumcall
aumcinf.obs lambda.z, clast.obs
aumcinf.obs.dn aumcinf.obs
aumcinf.obs_df aumcinf.obs
aumcinf.obs_se aumcinf.obs
aumcinf.pred lambda.z, clast.pred
aumcinf.pred.dn aumcinf.pred
aumcint.all (none)
aumcint.inf.obs lambda.z, clast.obs
aumcint.inf.pred lambda.z, clast.pred
aumcint.last (none)
aumcivall aumcall, c0
aumcivall_df aumcivall
aumcivall_se aumcivall
aumcivinf.obs aumcinf.obs, c0, lambda.z, clast.obs
aumcivinf.obs_df aumcivinf.obs
aumcivinf.obs_se aumcivinf.obs
aumcivinf.pred aumcinf.pred, c0, lambda.z, clast.pred
aumcivint.all aumcint.all, c0
aumcivint.last aumcint.last, c0
aumcivlast aumclast, c0
aumcivlast_df aumcivlast
aumcivlast_se aumcivlast
aumclast (none)
aumclast.dn aumclast
aumclast_df aumclast
aumclast_se 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)
erint ae
erlst (none)
ermax (none)
ertlst (none)
ertmax (none)
f.int.all totdose, aucint.all
f.int.last totdose, aucint.last
f.int.obs totdose, aucint.inf.obs
f.int.pred totdose, aucint.inf.pred
f.last totdose, auclast
f.obs totdose, aucinf.obs
f.pred totdose, aucinf.pred
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.ivmd.obs auclast, aumclast, aucinf.obs
mrt.ivmd.pred auclast, aumclast, aucinf.pred
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
ratio.aucinf.obs aucinf.obs
ratio.aucinf.pred aucinf.pred
ratio.aucint.all aucint.all
ratio.aucint.last aucint.last
ratio.auclast auclast
ratio.cmax cmax
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.ivmd.obs cl.last, mrt.ivmd.obs
vss.ivmd.pred cl.last, mrt.ivmd.pred
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

28.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 dense function: it is 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, and auclast_se by the sparse estimator of auclast), it is calculated only by a sparse estimator in $FUN_sparse, or it is an interval boundary (start, end). Parameters with a sparse-specific estimator (≥ 0.13.0) record it in $FUN_sparse, shown in its own column below.

The table below is the complete index of the calculation API: every registered parameter, the functions that compute 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)),
  fun_sparse = vapply(cols, function(x) as.character(x$FUN_sparse), 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", "Sparse function", "Unit type", "Description")
)
Parameter Function Sparse function Unit type Description
adj.r.squared NA NA unitless Adjusted R-sq of half-life fit
adj_tobit_residual NA NA unitless Adjusted Tobit residual SD
ae pk.calc.ae NA amount Amount excreted (urine/feces)
aucabove.predose.all pk.calc.aucabove NA auc AUC above predose, floor at 0
aucabove.trough.all pk.calc.aucabove NA auc AUC above trough, floor at 0
aucall pk.calc.auc.all pk.calc.aucall_sparse auc AUClast plus triangle, 0 at BLQ
aucall.dn pk.calc.dn NA auc_dosenorm Dose-normalized aucall
aucall_df NA NA count DF for AUCall (sparse PK only)
aucall_se NA NA auc SE of AUCall (sparse PK only)
aucinf.obs pk.calc.auc.inf.obs pk.calc.aucinf.obs_sparse auc AUC start to inf, obs Clast extrap
aucinf.obs.dn pk.calc.dn NA auc_dosenorm Dose-normalized aucinf.obs
aucinf.obs_df NA NA count DF for AUCinf,obs (sparse PK only)
aucinf.obs_se NA NA auc SE of AUCinf,obs (sparse PK only)
aucinf.pred pk.calc.auc.inf.pred NA auc AUC start to inf, pred Clast extrap
aucinf.pred.dn pk.calc.dn NA auc_dosenorm Dose-normalized aucinf.pred
aucint.all pk.calc.aucint.all NA auc AUC from T1 to T2 (AUCall extrap)
aucint.inf.obs pk.calc.aucint.inf.obs NA auc AUC from T1 to T2 (AUCinf,obs extrap)
aucint.inf.pred pk.calc.aucint.inf.pred NA auc AUC from T1 to T2 (AUCinf,pred extrap)
aucint.last pk.calc.aucint.last NA auc AUC from T1 to T2 (zero extrap)
aucivall pk.calc.auciv pk.calc.aucivall_sparse auc AUCall, IV back-extrap C0
aucivall_df NA NA count DF for AUCall IV (sparse PK only)
aucivall_se NA NA auc SE of AUCall IV (sparse PK only)
aucivinf.obs pk.calc.auciv pk.calc.aucivinf.obs_sparse auc AUCinf,obs, IV back-extrap C0
aucivinf.obs_df NA NA count DF for AUCinf,obs IV (sparse PK only)
aucivinf.obs_se NA NA auc SE of AUCinf,obs IV (sparse PK only)
aucivinf.pred pk.calc.auciv NA auc AUCinf,pred, IV back-extrap C0
aucivint.all pk.calc.auciv NA auc AUCint,all, IV back-extrap C0
aucivint.last pk.calc.auciv NA auc AUCint,last, IV back-extrap C0
aucivlast pk.calc.auciv pk.calc.aucivlast_sparse auc AUClast, IV back-extrap C0
aucivlast_df NA NA count DF for AUClast IV (sparse PK only)
aucivlast_se NA NA auc SE of AUClast IV (sparse PK only)
aucivpbextall pk.calc.auciv_pbext NA % Back-extrap %, IV, AUCall
aucivpbextinf.obs pk.calc.auciv_pbext NA % Back-extrap %, IV, AUCinf,obs
aucivpbextinf.pred pk.calc.auciv_pbext NA % Back-extrap %, IV, AUCinf,pred
aucivpbextint.all pk.calc.auciv_pbext NA % Back-extrap %, IV, AUCint,all
aucivpbextint.last pk.calc.auciv_pbext NA % Back-extrap %, IV, AUCint,last
aucivpbextlast pk.calc.auciv_pbext NA % Back-extrap %, IV, AUClast
auclast pk.calc.auc.last pk.calc.auclast_sparse auc AUC start to last conc above LOQ
auclast.dn pk.calc.dn NA auc_dosenorm Dose-normalized auclast
auclast_df NA NA count DF for AUClast (sparse PK only)
auclast_se NA NA auc SE of AUClast (sparse PK only)
aucpext.obs pk.calc.aucpext NA % % AUCinf extrap after Tlast, obs
aucpext.pred pk.calc.aucpext NA % % AUCinf extrap after Tlast, pred
aumcall pk.calc.aumc.all pk.calc.aumcall_sparse aumc AUMClast plus triangle moment, 0 at BLQ
aumcall.dn pk.calc.dn NA aumc_dosenorm Dose-normalized aumcall
aumcall_df NA NA count DF for AUMCall (sparse PK only)
aumcall_se NA NA aumc SE of AUMCall (sparse PK only)
aumcinf.obs pk.calc.aumc.inf.obs pk.calc.aumcinf.obs_sparse aumc AUMC start to inf, obs Clast extrap
aumcinf.obs.dn pk.calc.dn NA aumc_dosenorm Dose-normalized aumcinf.obs
aumcinf.obs_df NA NA count DF for AUMCinf,obs (sparse PK only)
aumcinf.obs_se NA NA aumc SE of AUMCinf,obs (sparse PK only)
aumcinf.pred pk.calc.aumc.inf.pred NA aumc AUMC start to inf, pred Clast extrap
aumcinf.pred.dn pk.calc.dn NA aumc_dosenorm Dose-normalized aumcinf.pred
aumcint.all pk.calc.aumcint.all NA aumc AUMC from T1 to T2 (AUMCall extrap)
aumcint.inf.obs pk.calc.aumcint.inf.obs NA aumc AUMC from T1 to T2 (AUMCinf,obs extrap)
aumcint.inf.pred pk.calc.aumcint.inf.pred NA aumc AUMC from T1 to T2 (AUMCinf,pred extrap)
aumcint.last pk.calc.aumcint.last NA aumc AUMC from T1 to T2 (zero extrap)
aumcivall pk.calc.aumciv pk.calc.aumcivall_sparse aumc AUMCall, IV back-extrap C0
aumcivall_df NA NA count DF for AUMCall IV (sparse PK only)
aumcivall_se NA NA aumc SE of AUMCall IV (sparse PK only)
aumcivinf.obs pk.calc.aumciv pk.calc.aumcivinf.obs_sparse aumc AUMCinf,obs, IV back-extrap C0
aumcivinf.obs_df NA NA count DF for AUMCinf,obs IV (sparse PK only)
aumcivinf.obs_se NA NA aumc SE of AUMCinf,obs IV (sparse PK only)
aumcivinf.pred pk.calc.aumciv NA aumc AUMCinf,pred, IV back-extrap C0
aumcivint.all pk.calc.aumciv NA aumc AUMCint,all, IV back-extrap C0
aumcivint.last pk.calc.aumciv NA aumc AUMCint,last, IV back-extrap C0
aumcivlast pk.calc.aumciv pk.calc.aumcivlast_sparse aumc AUMClast, IV back-extrap C0
aumcivlast_df NA NA count DF for AUMClast IV (sparse PK only)
aumcivlast_se NA NA aumc SE of AUMClast IV (sparse PK only)
aumclast pk.calc.aumc.last pk.calc.aumclast_sparse aumc AUMC start to last conc above LOQ
aumclast.dn pk.calc.dn NA aumc_dosenorm Dose-normalized aumclast
aumclast_df NA NA count DF for AUMClast (sparse PK only)
aumclast_se NA NA aumc SE of AUMClast (sparse PK only)
c0 pk.calc.c0 NA conc Initial conc after IV bolus
cav pk.calc.cav NA conc Avg conc in interval (AUClast)
cav.dn pk.calc.dn NA conc_dosenorm Dose-normalized cav
cav.int.all pk.calc.cav NA conc Avg conc in interval (AUCint,all)
cav.int.inf.obs pk.calc.cav NA conc Avg conc in interval (AUCint,inf,obs)
cav.int.inf.pred pk.calc.cav NA conc Avg conc in interval (AUCint,inf,pred)
cav.int.last pk.calc.cav NA conc Avg conc in interval (AUCint,last)
ceoi pk.calc.ceoi NA conc Concentration at the end of infusion
cl.all pk.calc.cl NA clearance Clearance, AUCall
cl.int.all pk.calc.cl NA clearance Clearance, AUCint,all
cl.int.inf.obs pk.calc.cl NA clearance Clearance, AUCint,inf,obs
cl.int.inf.pred pk.calc.cl NA clearance Clearance, AUCint,inf,pred
cl.int.last pk.calc.cl NA clearance Clearance, AUCint,last
cl.iv.all pk.calc.cl NA clearance IV clearance, AUCall
cl.iv.last pk.calc.cl NA clearance IV clearance, AUClast
cl.iv.obs pk.calc.cl NA clearance IV clearance, AUCinf,obs
cl.iv.pred pk.calc.cl NA clearance IV clearance, AUCinf,pred
cl.ivint.all pk.calc.cl NA clearance IV clearance, AUCint,all
cl.ivint.last pk.calc.cl NA clearance IV clearance, AUCint,last
cl.last pk.calc.cl NA clearance Clearance, AUClast
cl.obs pk.calc.cl NA clearance Clearance, observed Clast
cl.pred pk.calc.cl NA clearance Clearance, predicted Clast
cl.sparse.last NA pk.calc.cl clearance Clearance, sparse AUClast
clast.obs pk.calc.clast.obs NA conc Last conc observed above LOQ
clast.obs.dn pk.calc.dn NA conc_dosenorm Dose-normalized clast.obs
clast.pred NA NA conc Predicted Clast from half-life
clast.pred.dn pk.calc.dn NA conc_dosenorm Dose-normalized clast.pred
clr.last pk.calc.clr NA renal_clearance Renal clearance, AUClast
clr.last.dn pk.calc.dn NA renal_clearance_dosenorm Dose-normalized clr.last
clr.obs pk.calc.clr NA renal_clearance Renal clearance, AUCinf,obs
clr.obs.dn pk.calc.dn NA renal_clearance_dosenorm Dose-normalized clr.obs
clr.pred pk.calc.clr NA renal_clearance Renal clearance, AUCinf,pred
clr.pred.dn pk.calc.dn NA renal_clearance_dosenorm Dose-normalized clr.pred
cmax pk.calc.cmax NA conc Maximum observed concentration
cmax.dn pk.calc.dn NA conc_dosenorm Dose-normalized cmax
cmin pk.calc.cmin NA conc Minimum observed concentration
cmin.dn pk.calc.dn NA conc_dosenorm Dose-normalized cmin
count_conc pk.calc.count_conc NA count Count of non-missing conc
count_conc_measured pk.calc.count_conc_measured NA count Count of measured, non-BLQ conc
cstart pk.calc.cstart NA conc The predose concentration
ctrough pk.calc.ctrough NA conc Trough (end of interval) conc
ctrough.dn pk.calc.dn NA conc_dosenorm Dose-normalized ctrough
deg.fluc pk.calc.deg.fluc NA % Degree of fluctuation
end NA NA time End time of the interval (may be Inf)
erint pk.calc.erint NA amount_time Excretion rate from T1 to T2
erlst pk.calc.erlst NA amount_time Last measurable excretion rate
ermax pk.calc.ermax NA amount_time Maximum excretion rate
ertlst pk.calc.ertlst NA time Midpoint time of last excr rate
ertmax pk.calc.ertmax NA time Midpoint time of max excr rate
f.int.all pk.calc.f NA fraction Bioavailability from AUCint,all
f.int.last pk.calc.f NA fraction Bioavailability from AUCint,last
f.int.obs pk.calc.f NA fraction Bioavailability from AUCint,inf,obs
f.int.pred pk.calc.f NA fraction Bioavailability from AUCint,inf,pred
f.last pk.calc.f NA fraction Bioavailability from AUClast
f.obs pk.calc.f NA fraction Bioavailability from AUCinf,obs
f.pred pk.calc.f NA fraction Bioavailability from AUCinf,pred
fe pk.calc.fe NA amount_dose Fraction of dose excreted
half.life pk.calc.half.life NA time The (terminal) half-life
kel.all pk.calc.kel NA inverse_time Elim rate, MRTall
kel.int.all pk.calc.kel NA inverse_time Elim rate, MRTint,all
kel.int.inf.obs pk.calc.kel NA inverse_time Elim rate, MRTint,inf,obs
kel.int.inf.pred pk.calc.kel NA inverse_time Elim rate, MRTint,inf,pred
kel.int.last pk.calc.kel NA inverse_time Elim rate, MRTint,last
kel.iv.all pk.calc.kel NA inverse_time Elim rate, IV MRTall
kel.iv.last pk.calc.kel NA inverse_time Elim rate, IV MRTlast
kel.iv.obs pk.calc.kel NA inverse_time Elim rate, IV MRTobs
kel.iv.pred pk.calc.kel NA inverse_time Elim rate, IV MRTpred
kel.ivint.all pk.calc.kel NA inverse_time Elim rate, IV MRTint,all
kel.ivint.last pk.calc.kel NA inverse_time Elim rate, IV MRTint,last
kel.last pk.calc.kel NA inverse_time Elim rate, MRT via AUClast
kel.obs pk.calc.kel NA inverse_time Elim rate, MRT w/ obs Clast
kel.pred pk.calc.kel NA inverse_time Elim rate, MRT w/ pred Clast
kel.sparse.last NA pk.calc.kel inverse_time Elim rate, sparse MRTlast
lambda.z NA NA inverse_time Terminal elim rate (lambda.z)
lambda.z.corrxy NA NA unitless Corr(time,log-conc) for lambda.z
lambda.z.n.points NA NA count Number of points used, lambda.z
lambda.z.n.points_blq NA NA count BLQ points in Tobit lambda.z
lambda.z.time.first NA NA time First time point for lambda.z
lambda.z.time.last NA NA time Last time point for lambda.z
mrt.all pk.calc.mrt NA time MRT, AUCall/AUMCall
mrt.int.all pk.calc.mrt NA time MRT, interval AUCall/AUMCall
mrt.int.inf.obs pk.calc.mrt NA time MRT, interval AUCinf,obs/AUMCinf,obs
mrt.int.inf.pred pk.calc.mrt NA time MRT, interval AUCinf,pred/AUMCinf,pred
mrt.int.last pk.calc.mrt NA time MRT, interval AUClast/AUMClast
mrt.iv.all pk.calc.mrt.iv NA time IV MRT, AUCall/AUMCall
mrt.iv.last pk.calc.mrt.iv NA time IV MRT, AUClast/AUMClast
mrt.iv.obs pk.calc.mrt.iv NA time IV MRT, AUCinf,obs/AUMCinf,obs
mrt.iv.pred pk.calc.mrt.iv NA time IV MRT, AUCinf,pred/AUMCinf,pred
mrt.ivint.all pk.calc.mrt.iv NA time IV MRT, interval AUCall/AUMCall
mrt.ivint.last pk.calc.mrt.iv NA time IV MRT, interval AUClast/AUMClast
mrt.ivmd.obs pk.calc.mrt.md.iv NA time IV MRT, multi-dose, AUCinf,obs
mrt.ivmd.pred pk.calc.mrt.md.iv NA time IV MRT, multi-dose, AUCinf,pred
mrt.last pk.calc.mrt NA time MRT, AUClast/AUMClast
mrt.md.obs pk.calc.mrt.md NA time MRT, multi-dose AUCinf,obs/AUMCinf,obs
mrt.md.pred pk.calc.mrt.md NA time MRT, multi-dose AUCinf,pred/AUMCinf,pred
mrt.obs pk.calc.mrt NA time MRT to inf, observed Clast
mrt.pred pk.calc.mrt NA time MRT to inf, predicted Clast
mrt.sparse.last NA pk.calc.mrt time MRT, sparse AUClast/AUMClast
ptr pk.calc.ptr NA fraction Peak-to-trough ratio
r.squared NA NA unitless R-squared of half-life fit
ratio.aucinf.obs pk.calc.ratio NA fraction Ratio of AUCinf,obs to reference
ratio.aucinf.pred pk.calc.ratio NA fraction Ratio of AUCinf,pred to reference
ratio.aucint.all pk.calc.ratio NA fraction Ratio of AUCint,all to reference
ratio.aucint.last pk.calc.ratio NA fraction Ratio of AUCint,last to reference
ratio.auclast pk.calc.ratio NA fraction Ratio of AUClast to reference
ratio.cmax pk.calc.ratio NA fraction Ratio of Cmax to reference
span.ratio NA NA fraction Ratio of lambda.z time span to half-life
sparse_auc_df NA NA count DF for sparse AUC to last conc above LOQ
sparse_auc_se NA NA auc SE of sparse AUC to last conc above LOQ
sparse_auclast NA pk.calc.sparse_auclast auc Sparse AUC to last conc above LOQ
sparse_aumc_df NA NA count DF for sparse AUMClast
sparse_aumc_se NA NA aumc SE of sparse AUMC to last conc above LOQ
sparse_aumclast NA pk.calc.sparse_aumclast aumc Sparse AUMC to last conc above LOQ
start NA NA time Starting time of the interval
swing pk.calc.swing NA % Swing relative to Cmin
tfirst pk.calc.tfirst NA time Time of first conc above LOQ
thalf.eff.iv.last pk.calc.thalf.eff NA time Effective half-life, IV MRTlast
thalf.eff.iv.obs pk.calc.thalf.eff NA time Effective half-life, IV MRTobs
thalf.eff.iv.pred pk.calc.thalf.eff NA time Effective half-life, IV MRTpred
thalf.eff.last pk.calc.thalf.eff NA time Effective half-life, MRTlast
thalf.eff.obs pk.calc.thalf.eff NA time Effective half-life, MRTobs
thalf.eff.pred pk.calc.thalf.eff NA time Effective half-life, MRTpred
time_above pk.calc.time_above NA time Time above a given concentration
tlag pk.calc.tlag NA time Lag time
tlast pk.calc.tlast NA time Time of last conc above LOQ
tmax pk.calc.tmax NA time Time of maximum observed conc
tmin pk.calc.tmin NA time Time of minimum observed conc
tobit_residual NA NA unitless Tobit fit residual SD, log-conc
totdose pk.calc.totdose NA dose Total dose given in interval
volpk pk.calc.volpk NA volume Sum of urine volumes for interval
vss.all pk.calc.vss NA volume Vss, calc from AUCall
vss.int.all pk.calc.vss NA volume Vss, calc from interval AUCint,all
vss.int.inf.obs pk.calc.vss NA volume Vss, calc from interval AUCint,inf,obs
vss.int.inf.pred pk.calc.vss NA volume Vss, calc from interval AUCint,inf,pred
vss.int.last pk.calc.vss NA volume Vss, calc from interval AUCint,last
vss.iv.all pk.calc.vss NA volume IV Vss, calc from AUCall
vss.iv.last pk.calc.vss NA volume IV Vss, calc from AUClast
vss.iv.obs pk.calc.vss NA volume IV Vss, observed Clast
vss.iv.pred pk.calc.vss NA volume IV Vss, predicted Clast
vss.ivint.all pk.calc.vss NA volume IV Vss, calc from interval AUCint,all
vss.ivint.last pk.calc.vss NA volume IV Vss, calc from interval AUCint,last
vss.ivmd.obs pk.calc.vss NA volume IV Vss, multi-dose, obs
vss.ivmd.pred pk.calc.vss NA volume IV Vss, multi-dose, pred
vss.last pk.calc.vss NA volume Vss, calc from AUClast
vss.md.obs pk.calc.vss NA volume Vss, multi-dose, obs
vss.md.pred pk.calc.vss NA volume Vss, multi-dose, pred
vss.obs pk.calc.vss NA volume Vss, observed Clast
vss.pred pk.calc.vss NA volume Vss, predicted Clast
vss.sparse.last NA pk.calc.vss volume Vss, calc from sparse AUClast
vz.all pk.calc.vz NA volume Vz, AUCall-based CL
vz.int.all pk.calc.vz NA volume Vz, interval AUCint,all
vz.int.inf.obs pk.calc.vz NA volume Vz, interval AUCint,inf,obs
vz.int.inf.pred pk.calc.vz NA volume Vz, interval AUCint,inf,pred
vz.int.last pk.calc.vz NA volume Vz, interval AUCint,last
vz.iv.all pk.calc.vz NA volume IV Vz, AUCall
vz.iv.last pk.calc.vz NA volume IV Vz, AUClast
vz.iv.obs pk.calc.vz NA volume IV Vz, observed AUCinf
vz.iv.pred pk.calc.vz NA volume IV Vz, predicted AUCinf
vz.ivint.all pk.calc.vz NA volume IV Vz, interval AUCint,all
vz.ivint.last pk.calc.vz NA volume IV Vz, interval AUCint,last
vz.last pk.calc.vz NA volume Vz, AUClast-based CL
vz.obs pk.calc.vz NA volume Vz, observed Clast
vz.pred pk.calc.vz NA volume Vz, predicted Clast
vz.sparse.last NA pk.calc.vz volume Vz from sparse sampling

28.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)))
33 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)))
204 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
aucall_df 1
aucall_se 1
aucinf.obs.dn 1
aucinf.obs_df 1
aucinf.obs_se 1
aucinf.pred.dn 1
aucivall_df 1
aucivall_se 1
aucivinf.obs_df 1
aucivinf.obs_se 1
aucivlast_df 1
aucivlast_se 1
auclast.dn 1
auclast_df 1
auclast_se 1
aumcall.dn 1
aumcall_df 1
aumcall_se 1
aumcinf.obs.dn 1
aumcinf.obs_df 1
aumcinf.obs_se 1
aumcinf.pred.dn 1
aumcivall_df 1
aumcivall_se 1
aumcivinf.obs_df 1
aumcivinf.obs_se 1
aumcivlast_df 1
aumcivlast_se 1
aumclast.dn 1
aumclast_df 1
aumclast_se 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
erint 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
ratio.aucinf.obs 1
ratio.aucinf.pred 1
ratio.aucint.all 1
ratio.aucint.last 1
ratio.auclast 1
ratio.cmax 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.pred 2
aucivall 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.pred 2
aumcivall 2
aumcivint.all 2
aumcivint.last 2
aumcivlast 2
f.int.all 2
f.int.last 2
f.int.obs 2
f.int.pred 2
f.last 2
f.obs 2
f.pred 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.ivmd.obs 2
vss.ivmd.pred 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.ivmd.obs 3
mrt.ivmd.pred 3
mrt.md.obs 3
mrt.md.pred 3
aucivinf.obs 4
aucivinf.pred 4
aumcivinf.obs 4
aumcivinf.pred 4

28.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] "aucivall_df"       "aucivall_se"       "aucivinf.obs_df"  
 [4] "aucivinf.obs_se"   "aucivlast"         "aucivlast_df"     
 [7] "aucivlast_se"      "aucivpbextlast"    "auclast"          
[10] "auclast_df"        "auclast_se"        "auclast.dn"       
[13] "aucpext.obs"       "aucpext.pred"      "cav"              
[16] "cav.dn"            "cl.iv.last"        "cl.last"          
[19] "deg.fluc"          "f.last"            "kel.iv.last"      
[22] "kel.last"          "mrt.iv.last"       "mrt.ivmd.obs"     
[25] "mrt.ivmd.pred"     "mrt.last"          "mrt.md.obs"       
[28] "mrt.md.pred"       "ratio.auclast"     "thalf.eff.iv.last"
[31] "thalf.eff.last"    "vss.iv.last"       "vss.ivmd.obs"     
[34] "vss.ivmd.pred"     "vss.last"          "vss.md.obs"       
[37] "vss.md.pred"       "vz.iv.last"        "vz.last"          

With recursive = TRUE (≥ 0.13.0) it goes the other way, following each dependency back to the raw inputs (conc, time, dose, …) and the arguments of the calculation functions along the way:

get.parameter.deps("cl.last", recursive = TRUE)
[1] "conc"    "dose"    "options" "time"