What this is
I've built a comprehensive Quarto book documenting PKNCA ≥ 0.12.2 with runnable examples throughout. It covers every function, option, and parameter in the package and is aimed at analysts, clinical pharmacologists, and developers who want a single reference that goes deeper than the existing vignettes.
Source: https://github.com/TeunP/PKNCA.doc
(public repo — clone and quarto render to build locally with your installed PKNCA version)
What's covered
19 user chapters — all verified against live PKNCA 0.12.2 via Rscript:
| Chapter |
Highlights |
| Workflow & options |
All 21 options documented with defaults and effect |
| Interval selection & parameter catalogue |
Full get.interval.cols() table (143 params) |
| AUC types & integration methods |
lin up/log down, lin-log (Tmax switch), linear; partial AUC; aucabove; time_above |
| Half-life & terminal phase |
adj.r.squared.factor as selection tolerance; quality filters (only min.hl.points enforced inside fit); Tobit regression (pk.calc.half.life() direct API); lambda.z.corrxy |
| Extravascular (oral/SC) |
BLQ handling, imputation strategies, tmin, first.tmin |
| Intravascular (IV) |
Full bolus NCA + complete IV infusion example with ceoi, MRT correction |
| Multiple-dose / steady-state |
deg.fluc, swing, ptr (= Cmax/Ctrough), cav, tau.choices |
| Urine excretion |
ae, fe, clr.*; new: volpk, ermax, ertmax, ertlst, clr.*.dn |
| Sparse PK |
AUC + SE + df; new sparse AUMC (sparse_aumclast); derived params (mrt.sparse.last, cl.sparse.last, kel.sparse.last) |
| Post-processing |
exclude(), exclude_nca_*; normalize() / normalize_by_col(); .dn table (17 params); get_halflife_points() |
| Units |
pknca_units_table() S3 generic + PKNCAdata method; allow_partial_missing_units |
| Imputation |
start_conc0, start_predose, start_cmin; custom methods |
| Regulatory / CDISC |
PP domain column mapping; exclude → PPEXCLFL; summary() for CSR tables |
| Validation |
testthat suite; manual AUClast spot-check vs. both linear and lin-up/log-down |
| + TSS, superposition, dose-aware interpolation, custom parameters, utilities |
|
One thing I found while writing this
When hl_method = "tobit" is passed through PKNCAdata(options = list(hl_method = "tobit")) via pk.nca(), the call reaches pk.calc.half.life() but lloq is NULL, triggering the "Please report a bug" stop. The lloq is not currently wired through the pk.nca() pipeline from PKNCAconc. I documented the direct pk.calc.half.life() API as a workaround and added a note that pipeline integration is pending. Happy to open a separate issue if useful.
How to build
# Install PKNCA 0.12.2
remotes::install_github("humanpred/pknca")
# Clone and render
# git clone https://github.com/TeunP/PKNCA.doc
# cd PKNCA.doc
# quarto render
Feedback very welcome — happy to correct anything or fill gaps.
What this is
I've built a comprehensive Quarto book documenting PKNCA ≥ 0.12.2 with runnable examples throughout. It covers every function, option, and parameter in the package and is aimed at analysts, clinical pharmacologists, and developers who want a single reference that goes deeper than the existing vignettes.
Source: https://github.com/TeunP/PKNCA.doc
(public repo — clone and
quarto renderto build locally with your installed PKNCA version)What's covered
19 user chapters — all verified against live PKNCA 0.12.2 via
Rscript:get.interval.cols()table (143 params)min.hl.pointsenforced inside fit); Tobit regression (pk.calc.half.life()direct API);lambda.z.corrxytmin,first.tminceoi, MRT correctiondeg.fluc,swing,ptr(= Cmax/Ctrough),cav,tau.choicesae,fe,clr.*; new:volpk,ermax,ertmax,ertlst,clr.*.dnsparse_aumclast); derived params (mrt.sparse.last,cl.sparse.last,kel.sparse.last)exclude(),exclude_nca_*;normalize()/normalize_by_col();.dntable (17 params);get_halflife_points()pknca_units_table()S3 generic +PKNCAdatamethod;allow_partial_missing_unitsstart_conc0,start_predose,start_cmin; custom methodsexclude→PPEXCLFL;summary()for CSR tablesOne thing I found while writing this
When
hl_method = "tobit"is passed throughPKNCAdata(options = list(hl_method = "tobit"))viapk.nca(), the call reachespk.calc.half.life()butlloqisNULL, triggering the "Please report a bug" stop. Thelloqis not currently wired through thepk.nca()pipeline fromPKNCAconc. I documented the directpk.calc.half.life()API as a workaround and added a note that pipeline integration is pending. Happy to open a separate issue if useful.How to build
Feedback very welcome — happy to correct anything or fill gaps.