Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ export(pk.calc.mrt.md)
export(pk.calc.ptr)
export(pk.calc.sparse_auc)
export(pk.calc.sparse_auclast)
export(pk.calc.sparse_aumc)
export(pk.calc.sparse_aumclast)
export(pk.calc.swing)
export(pk.calc.tfirst)
export(pk.calc.thalf.eff)
Expand Down Expand Up @@ -250,6 +252,7 @@ export(superposition)
export(time_calc)
export(ungroup)
export(var_sparse_auc)
export(var_sparse_aumc)
importFrom(dplyr,"%>%")
importFrom(dplyr,filter)
importFrom(dplyr,full_join)
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ the dosing including dose amount and route.
for grouped joins, preserving left-table row order. Missing group validation
ensures no rows are silently dropped.

## New features
* Added sparse AUMC function and five sparse AUC parameters (cl.sparse.last, kel.sparse.last, mrt.ivint.last, vss.sparse.last, vz.sparse.last)

## Breaking changes

* `pknca_units_table()` called on a `PKNCAdata` object now raises an error if
Expand Down
63 changes: 63 additions & 0 deletions R/pk.calc.simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,16 @@ PKNCA.set.summary(
spread=business.geocv
)

add.interval.col("kel.sparse.last",
FUN = "pk.calc.kel",
values = c(FALSE, TRUE),
unit_type = "inverse_time",
pretty_name = "Kel (for sparse data, based on AUClast)",
desc = "Elimination rate (as calculated from the MRTsparse.last)",
sparse = TRUE,
formalsmap = list(mrt = "mrt.sparse.last"),
depends = "mrt.sparse.last")

#' Calculate the (observed oral) clearance
#'
#' @details cl is `dose/auc`.
Expand Down Expand Up @@ -663,6 +673,16 @@ PKNCA.set.summary(
spread=business.geocv
)

add.interval.col("cl.sparse.last",
FUN = "pk.calc.cl",
values = c(FALSE, TRUE),
unit_type = "clearance",
pretty_name = "CL (for sparse data, based on AUClast)",
desc = "Clearance from sparse sampling calculated with population AUClast",
sparse = TRUE,
formalsmap = list(auc = "sparse_auclast"),
depends = "sparse_auclast")

#' Calculate the absolute (or relative) bioavailability
#'
#' @details f is `(auc2/dose2)/(auc1/dose1)`.
Expand Down Expand Up @@ -759,6 +779,16 @@ PKNCA.set.summary(
spread=business.geocv
)

add.interval.col("mrt.sparse.last",
FUN = "pk.calc.mrt",
values = c(FALSE, TRUE),
unit_type = "time",
pretty_name = "MRT (for sparse data, based on AUClast)",
desc = "Mean residence time from sparse sampling",
sparse = TRUE,
formalsmap = list(auc = "sparse_auclast", aumc = "sparse_aumclast"),
depends = c("sparse_auclast", "sparse_aumclast"))

#' @describeIn pk.calc.mrt MRT for an IV infusion
#' @export
pk.calc.mrt.iv <- function(auc, aumc, duration.dose) {
Expand Down Expand Up @@ -912,6 +942,19 @@ PKNCA.set.summary(
spread=business.geocv
)

add.interval.col(
"vz.sparse.last",
FUN = "pk.calc.vz",
values = c(FALSE, TRUE),
unit_type = "volume",
pretty_name = "Vz (for sparse data, based on AUClast)",
desc = "Terminal volume of distribution from sparse sampling",
sparse = TRUE,
formalsmap = list(cl = "cl.sparse.last", lambda.z = "kel.sparse.last"),
depends = c("cl.sparse.last", "kel.sparse.last")
)


#' Calculate the steady-state volume of distribution (Vss)
#'
#' @details vss is `cl*mrt`.
Expand Down Expand Up @@ -1037,6 +1080,16 @@ PKNCA.set.summary(
spread=business.geocv
)

add.interval.col("vss.sparse.last",
FUN = "pk.calc.vss",
values = c(FALSE, TRUE),
unit_type = "volume",
pretty_name = "Vss (for sparse data, based on AUClast)",
desc = "Steady-state volume of distribution from sparse sampling",
sparse = TRUE,
formalsmap = list(cl = "cl.sparse.last", mrt = "mrt.sparse.last"),
depends = c("cl.sparse.last", "mrt.sparse.last"))

#' Calculate the average concentration during an interval.
#'
#' @details cav is `auc/(end-start)`.
Expand Down Expand Up @@ -1463,3 +1516,13 @@ PKNCA.set.summary(
point=business.median,
spread=business.range
)

PKNCA.set.summary(
name = c(
"cl.sparse.last", "kel.sparse.last", "mrt.sparse.last", "vss.sparse.last",
"vz.sparse.last"
),
description = "geometric mean and geometric coefficient of variation",
point = business.geomean,
spread = business.geocv
)
Loading
Loading