flowchart LR
A["Concentration<br/>data frame"] --> B[PKNCAconc]
C["Dose<br/>data frame"] --> D[PKNCAdose]
B --> E[PKNCAdata]
D --> E
F["Intervals<br/>specification"] -.->|optional override| E
E --> G[pk.nca]
G --> H[PKNCAresults]
H --> I[summary]
H --> J[as.data.frame]
PKNCA: Noncompartmental Analysis in R
PKNCA is an R package for automated noncompartmental analysis (NCA). It calculates PK parameters (AUC, Cmax, half-life, clearance, volume, and many more) from concentration-time data, supports IV and extravascular routes, urine excretion, sparse sampling, multiple-dose designs, and CDISC-aligned output. This book documents PKNCA ≥ 0.13.0 with runnable examples throughout. For the package authors’ own orientation material, see the vignettes Introduction to PKNCA and Usage Instructions and PKNCA – an R package for noncompartmental analysis of pharmacokinetic data.
0.1 What is NCA?
Noncompartmental analysis (NCA) derives pharmacokinetic parameters directly from observed data using numerical integration — no compartmental model assumptions required. NCA is used to answer:
- How much drug was absorbed? → AUC
- How fast was drug eliminated? → half-life, λz
- How high did concentrations get? → Cmax
- How quickly was drug cleared? → CL
- How widely did drug distribute? → Vz
0.2 Core workflow
| Object | Purpose |
|---|---|
PKNCAconc |
Concentration data location and grouping |
PKNCAdose |
Dose amount, time, and route |
PKNCAdata |
Parameters and analysis intervals |
PKNCAresults |
Computed NCA parameters, units, exclusion flags |
The vignette Computing NCA Parameters for Theophylline runs this exact pipeline end-to-end.
0.3 Route-specific parameters
| Parameter | IV | Extravascular |
|---|---|---|
| C0 (extrapolated at t=0) | ✓ | — |
| Cmax | ✓ | ✓ |
| Tmax | ✓ | ✓ |
| AUClast / AUCinf | ✓ | ✓ |
| Half-life / λz | ✓ | ✓ |
| CL (true clearance) | ✓ | — (apparent: CL/F) |
| Vz (volume) | ✓ | — (apparent: Vz/F) |
| Bioavailability (F) | — (serves as reference) | ✓ |
For bioavailability, IV data serve as the reference against which extravascular exposure is compared.
0.4 What’s new in 0.13.0
PKNCA 0.13.0 is a large release; the package NEWS lists every change. Changes that alter default results are marked breaking.
- Automatic intervals rebuilt (breaking) — when no intervals are given,
PKNCAdata()builds them from the dosing regimen: a single dose gets one interval from the dose to infinity withstart_predose_conc0imputation, and repeated dosing gets an interval between each pair of sampled consecutive doses, chosen segment by segment when the regimen changes.auto.interval.method = "legacy"restores the previous behavior. See Automatic Intervals and Dosing Regimens. - Dosing-regimen detection —
find.dose.regimen()and a reworkedfind.tau(), nominal times, and time units fortau. - Secondary parameters in one run — bioavailability, accumulation and metabolite ratios, and renal clearance computed across intervals and groups with
interval_id/*_refcolumns andinterval_add_secondary(). See Secondary Parameters. - Bioavailability renamed (breaking) —
fis nowf.obs, alongsidef.pred,f.last, and thef.int.*family. - Bioequivalence — the
be_*functions assess average, scaled, and narrow-therapeutic-index bioequivalence and descriptive comparisons. See Bioequivalence. - Sparse NCA unified (breaking names) — sparse results use the standard parameter names (
auclast,aucinf.obs,aucivinf.obs, …) with_seand_dfcompanions; the AUC to infinity includes the uncertainty of λz by the delta method; IV bolus, batch designs, andsparse_bootstrap()are supported. See Sparse PK Sampling. - Dose-aware partial AUCs (breaking) — every
aucint/aumcintparameter is dose-aware; the.dosevariants are retired. - Data quality checks —
pknca_missing_samples()and theexclude_nca_tmax_coverage()exclusion rule. See Data Quality Checks. - Date-time data and CDISC output — POSIXct/Date times, SDTM time references (PPSTINT, PPENINT, PPTPTREF, PPRFTDTC), PPGRPID, and
as.data.frame(results, out_format = "cdisc"). See Date-Time Data and Time References and Regulatory & CDISC. - Half-life — Tobit regression through the full
pk.nca()pipeline (PKNCAconc(lloq = )), point-selection controls,lambda.z.corrxy, andget_halflife_fit()/get_halflife_curve()for plotting the fit. - Interval tools —
pknca_interval_table(),pknca_presets(),pknca_parameter_table(), and theinterval_add_param()family. - Expanded parameters — the
cl.*,kel.*,mrt.*,vss.*, andvz.*families,aumciv*,aumcint*,tmin, and excretion parameters (volpk,ermax,ertmax,ertlst,clr.*.dn). - Post-processing and units —
normalize()/normalize_by_col(), andpknca_units_table()built automatically byPKNCAdata().