NCA.jl
NCA.jl performs Non-Compartmental Analysis (NCA) of pharmacokinetic and pharmacodynamic data. It supports both plasma and urine analyses, single-dose and steady-state profiles, and provides a comprehensive set of NCA endpoints.
Workflow
A typical NCA workflow consists of these steps:
- Read data with
read_ncaorread_nca_pumas - Transform (optional) with
transform_ncafor BLQ handling, sparse sampling, or LLQ truncation - Run analysis with
run_ncato compute NCA endpoints - Summarize with
summarizeto compute summary statistics across subjects
Additional analyses:
- Dose linearity assessment with
DoseLinearityPowerModelorDoseLinearityRatioTest - Superposition for predicting steady-state profiles from single-dose data
Quick Start
using NCA, PharmaDatasets, DataFrames
df = dataset("ncakeppra")
rename!(df, :conc => :concentration)
df.route .= "ev"
nca_data = read_nca(df)
results = run_nca(nca_data)
summary = summarize(results)41×10 DataFrame
| Row | parameters | numsamples | nonmissing | minimum | maximum | mean | std | geomean | geostd | geomeanCV |
|---|---|---|---|---|---|---|---|---|---|---|
| String | Int64 | Int64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | |
| 1 | auc_extrap_percent_obs | 300 | 300 | 0.00706545 | 15.7227 | 2.38515 | 2.37085 | 1.30532 | 3.65251 | 208.695 |
| 2 | auc_extrap_percent_pred | 300 | 300 | 0.00567207 | 15.6322 | 2.31265 | 2.32856 | 1.26777 | 3.62928 | 206.586 |
| 3 | aucinf_dn_obs | 300 | 300 | 0.42427 | 1.30889 | 0.710368 | 0.130884 | 0.699089 | 1.1943 | 17.8967 |
| 4 | aucinf_dn_pred | 300 | 300 | 0.424935 | 1.30732 | 0.709792 | 0.130603 | 0.698562 | 1.19386 | 17.8596 |
| 5 | aucinf_obs | 300 | 300 | 115.721 | 880.963 | 358.642 | 171.121 | 317.582 | 1.66053 | 54.1558 |
| 6 | aucinf_pred | 300 | 300 | 115.772 | 876.162 | 358.316 | 170.887 | 317.343 | 1.65995 | 54.1134 |
| 7 | auclast | 300 | 300 | 113.1 | 851.251 | 349.096 | 164.126 | 309.913 | 1.65257 | 53.5749 |
| 8 | auclast_dn | 300 | 300 | 0.413885 | 1.15837 | 0.691845 | 0.118552 | 0.682208 | 1.18133 | 16.7809 |
| 9 | aumc_extrap_percent_obs | 300 | 300 | 0.0753906 | 47.6452 | 10.4298 | 8.43656 | 6.80804 | 2.93837 | 148.175 |
| 10 | aumc_extrap_percent_pred | 300 | 300 | 0.0605309 | 47.4744 | 10.1357 | 8.28026 | 6.63016 | 2.92152 | 146.844 |
| 11 | aumcinf_obs | 300 | 300 | 412.171 | 8404.79 | 2218.65 | 1430.18 | 1823.1 | 1.89078 | 70.7412 |
| 12 | aumcinf_pred | 300 | 300 | 412.516 | 8861.8 | 2208.7 | 1424.38 | 1816.78 | 1.88712 | 70.48 |
| 13 | aumclast | 300 | 300 | 410.388 | 5951.2 | 1914.45 | 1094.04 | 1625.08 | 1.79655 | 63.9931 |
| 14 | cl_f_obs | 300 | 300 | 0.764003 | 2.35699 | 1.45269 | 0.253333 | 1.43043 | 1.1943 | 17.8967 |
| 15 | cl_f_pred | 300 | 300 | 0.764921 | 2.3533 | 1.45368 | 0.252892 | 1.43151 | 1.19386 | 17.8596 |
| 16 | clast | 300 | 300 | 0.01 | 6.97 | 1.294 | 1.33291 | 0.724117 | 3.41382 | 187.503 |
| 17 | clast_pred | 300 | 300 | 0.00802778 | 8.04286 | 1.24415 | 1.28958 | 0.702757 | 3.37959 | 184.548 |
| 18 | cmax | 300 | 300 | 18.91 | 196.52 | 69.1436 | 34.1329 | 60.6221 | 1.70052 | 57.0646 |
| 19 | cmax_dn | 300 | 300 | 0.07384 | 0.262027 | 0.137483 | 0.0349463 | 0.133447 | 1.27322 | 24.5112 |
| 20 | cmin | 300 | 300 | 0.01 | 6.97 | 1.28713 | 1.32343 | 0.722181 | 3.40547 | 186.781 |
| 21 | cmin_dn | 300 | 300 | 1.33333e-5 | 0.01112 | 0.00249504 | 0.00210269 | 0.00158973 | 3.03703 | 156.049 |
| 22 | half_life | 300 | 300 | 1.70807 | 9.84021 | 4.15702 | 1.30476 | 3.96817 | 1.35603 | 31.1759 |
| 23 | lambdaz | 300 | 300 | 0.0704403 | 0.405807 | 0.182871 | 0.056119 | 0.174677 | 1.35603 | 31.1759 |
| 24 | lambdazadjr2 | 300 | 300 | 0.913544 | 0.999998 | 0.986538 | 0.014383 | 0.986431 | 1.01494 | 1.48313 |
| 25 | lambdazintercept | 300 | 300 | 1.59923 | 5.68188 | 4.03615 | 0.647865 | 3.98042 | 1.18695 | 17.2649 |
| 26 | lambdaznpoints | 300 | 300 | 3.0 | 15.0 | 7.67667 | 3.69924 | 6.74466 | 1.69517 | 56.6761 |
| 27 | lambdazr2 | 300 | 300 | 0.920749 | 0.999999 | 0.988801 | 0.0126919 | 0.988718 | 1.01313 | 1.30429 |
| 28 | lambdaztimefirst | 300 | 300 | 0.25 | 16.0 | 6.245 | 5.64979 | 3.61224 | 3.25265 | 173.766 |
| 29 | lambdaztimelast | 300 | 300 | 24.0 | 24.0 | 24.0 | 0.0 | 24.0 | 1.0 | 1.33449e-13 |
| 30 | mrtinf_obs | 300 | 300 | 2.48017 | 12.6047 | 5.97119 | 1.67544 | 5.74055 | 1.32798 | 28.9463 |
| 31 | mrtinf_pred | 300 | 300 | 2.47984 | 12.5772 | 5.95325 | 1.66648 | 5.72499 | 1.32635 | 28.8157 |
| 32 | mrtlast | 300 | 300 | 2.47848 | 7.83028 | 5.3642 | 1.10646 | 5.24367 | 1.24389 | 22.0866 |
| 33 | n_samples | 300 | 300 | 16.0 | 16.0 | 16.0 | 0.0 | 16.0 | 1.0 | 0.0 |
| 34 | span | 300 | 300 | 0.852602 | 13.6119 | 4.69781 | 2.12638 | 4.18378 | 1.66741 | 54.6575 |
| 35 | tfinal | 300 | 300 | 24.0 | 24.0 | 24.0 | 0.0 | 24.0 | 1.0 | 1.33449e-13 |
| 36 | tlag | 300 | 300 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | NaN | NaN |
| 37 | tlast | 300 | 300 | 24.0 | 24.0 | 24.0 | 0.0 | 24.0 | 1.0 | 1.33449e-13 |
| 38 | tmax | 300 | 300 | 0.0 | 2.0 | 0.364167 | 0.390212 | 0.0 | NaN | NaN |
| 39 | tmin | 300 | 300 | 20.0 | 24.0 | 23.9333 | 0.512932 | 23.9272 | 1.02366 | 2.33828 |
| 40 | vz_f_obs | 300 | 300 | 3.9339 | 18.4613 | 8.4898 | 2.39128 | 8.18903 | 1.30424 | 27.0373 |
| 41 | vz_f_pred | 300 | 300 | 3.93347 | 18.4417 | 8.49643 | 2.39281 | 8.1952 | 1.30444 | 27.054 |