| Title: | Automated Noncompartmental Pharmacokinetic Analysis |
|---|---|
| Description: | Provides functions for automated noncompartmental pharmacokinetic (NCA) analysis using concentration-time data. The package estimates pharmacokinetic parameters including area under the concentration-time curve (AUC), area under the first moment curve (AUMC), maximum concentration (Cmax), time to maximum concentration (Tmax), terminal elimination rate constant (Kel), elimination half-life, clearance, volume of distribution, and mean residence time (MRT). It supports automatic terminal phase selection, bootstrap confidence intervals, and publication-ready concentration-time profiles. Methods are based on Gibaldi and Perrier (1982, ISBN:9780824710422). |
| Authors: | N. Shreenithi [aut, cre], S. Vishnu Shankar [aut], Balaji Kannan [aut] |
| Maintainer: | N. Shreenithi <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-09-23 11:43:10 UTC |
| Source: | https://github.com/cran/SmartPK |
Provides functions for automated noncompartmental pharmacokinetic (NCA) analysis using concentration-time data. The package estimates pharmacokinetic parameters including area under the concentration-time curve (AUC), area under the first moment curve (AUMC), maximum concentration (Cmax), time to maximum concentration (Tmax), terminal elimination rate constant (Kel), elimination half-life, clearance, volume of distribution, and mean residence time (MRT). It supports automatic terminal phase selection, bootstrap confidence intervals, and publication-ready concentration-time profiles.
SmartPK( data, dose, time_col = "Time", conc_col = "Concentration", route = c("iv", "extravascular"), min_terminal_points = 3, max_terminal_points = 6, lambda_method = c("auto", "lastn", "manual"), terminal_idx = NULL, n_boot = 0, conf_level = 0.95, plot = TRUE, log_plot = TRUE, return_plot = TRUE )SmartPK( data, dose, time_col = "Time", conc_col = "Concentration", route = c("iv", "extravascular"), min_terminal_points = 3, max_terminal_points = 6, lambda_method = c("auto", "lastn", "manual"), terminal_idx = NULL, n_boot = 0, conf_level = 0.95, plot = TRUE, log_plot = TRUE, return_plot = TRUE )
data |
A data frame containing concentration-time observations. |
dose |
A single positive numeric dose value. |
time_col |
Name of the time column in |
conc_col |
Name of the concentration column in |
route |
Route of administration. Must be |
min_terminal_points |
Minimum number of points used to estimate the terminal phase. |
max_terminal_points |
Maximum number of points used to estimate the terminal phase. |
lambda_method |
Method for terminal slope estimation: |
terminal_idx |
Integer indices of terminal points when |
n_boot |
Number of bootstrap resamples used to estimate confidence intervals. Set to 0 to skip bootstrapping. |
conf_level |
Confidence level for bootstrap intervals. Default is |
plot |
Logical; whether to generate a concentration-time plot. |
log_plot |
Logical; whether the plot should use a log10 y-axis. |
return_plot |
Logical; whether to include the plot in the returned object. |
The function computes observed AUC and AUMC using the trapezoidal rule, then
extrapolates to infinity using the terminal elimination rate constant estimated
from a log-linear regression of the terminal phase. The terminal phase may be
selected automatically, manually, or using the last n points depending on
the value of lambda_method.
A list with the following components:
summary: A data frame of estimated PK parameters.
terminal_fit: A list containing the terminal points used, fit statistics, and the estimated Kel.
plot: A ggplot object showing the concentration-time profile, if plot = TRUE.
Gibaldi, M. and Perrier, D. (1982). Pharmacokinetics. 2nd Edition. Marcel Dekker, New York. ISBN: 9780824710422.
df <- data.frame( Time = c(0, 1, 2, 4, 6, 8), Concentration = c(0, 12, 9, 5, 2, 0.8) ) SmartPK(df, dose = 100)df <- data.frame( Time = c(0, 1, 2, 4, 6, 8), Concentration = c(0, 12, 9, 5, 2, 0.8) ) SmartPK(df, dose = 100)