Title: | Pharmacokinetics in R |
---|---|
Description: | Conduct a noncompartmental analysis as closely as possible to the most widely used commercial software. Some features are 1) CDISC SDTM terms 2) Automatic slope selection with the same criterion of WinNonlin(R) 3) Supporting both 'linear-up linear-down' and 'linear-up log-down' method 4) Interval(partial) AUCs with 'linear' or 'log' interpolation method * Reference: Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications. 5th ed. 2016. (ISBN:9198299107). |
Authors: | Kyun-Seop Bae [aut], Jee Eun Lee [aut] |
Maintainer: | Kyun-Seop Bae <[email protected]> |
License: | GPL-3 |
Version: | 0.1.3 |
Built: | 2024-11-27 06:31:07 UTC |
Source: | CRAN |
It conducts a noncompartmental analysis(NCA) as closely as possible to the most widely used commercial pharmacokinetic analysis software.
The main functions are
NCA to perform NCA for many subjects. IndiNCA to perform NCA for one subject.
Kyun-Seop Bae <[email protected]>, Jee Eun Lee <[email protected]>
Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications. 5th ed. 2016.
Shargel L, Yu A. Applied Biopharmaceutics and Pharmacokinetics. 7th ed. 2015.
Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and Applications. 4th ed. 2011.
Gibaldi M, Perrier D. Pharmacokinetics. 2nd ed. revised and expanded. 1982.
# Theoph and Indometh data: dose in mg, conc in mg/L, time in h NCA(Theoph, "Subject", "Time", "conc", dose=320, uConc="mg/L") NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", uConc="mg/L") iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24)) ; iAUC NCA(Theoph, "Subject", "Time", "conc", dose=320, iAUC=iAUC, uConc="mg/L") NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", iAUC=iAUC, uConc="mg/L") # writeLines(NCA(Theoph, "Subject", "Time", "conc", dose=320, report="Text", uConc="mg/L"), # "Theoph_Linear_CoreOutput.txt") # writeLines(NCA(Theoph, "Subject", "Time", "conc", dose=320, fit="Log", report="Text", # uConc="mg/L"), "Theoph_Log_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", report="Text", # uConc="mg/L"), "Indometh_Bolus_Linear_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", fit="Log", # report="Text", uConc="mg/L"), "Indometh_Bolus_Log_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Infusion", dur=0.25, # report="Text", uConc="mg/L"), "Indometh_Infusion_Linear_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Infusion", dur=0.25, # fit="Log", report="Text", uConc="mg/L"), "Indometh_Infusion_Log_CoreOutput.txt") sNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, concUnit="mg/L") sNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Bolus", concUnit="mg/L") sNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Infusion", dur=0.25, concUnit="mg/L") iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24)) ; iAUC sNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, iAUC=iAUC, concUnit="mg/L") sNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Bolus", iAUC=iAUC, concUnit="mg/L") sNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Infusion", dur=0.25, iAUC=iAUC, concUnit="mg/L")
# Theoph and Indometh data: dose in mg, conc in mg/L, time in h NCA(Theoph, "Subject", "Time", "conc", dose=320, uConc="mg/L") NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", uConc="mg/L") iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24)) ; iAUC NCA(Theoph, "Subject", "Time", "conc", dose=320, iAUC=iAUC, uConc="mg/L") NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", iAUC=iAUC, uConc="mg/L") # writeLines(NCA(Theoph, "Subject", "Time", "conc", dose=320, report="Text", uConc="mg/L"), # "Theoph_Linear_CoreOutput.txt") # writeLines(NCA(Theoph, "Subject", "Time", "conc", dose=320, fit="Log", report="Text", # uConc="mg/L"), "Theoph_Log_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", report="Text", # uConc="mg/L"), "Indometh_Bolus_Linear_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", fit="Log", # report="Text", uConc="mg/L"), "Indometh_Bolus_Log_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Infusion", dur=0.25, # report="Text", uConc="mg/L"), "Indometh_Infusion_Linear_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Infusion", dur=0.25, # fit="Log", report="Text", uConc="mg/L"), "Indometh_Infusion_Log_CoreOutput.txt") sNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, concUnit="mg/L") sNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Bolus", concUnit="mg/L") sNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Infusion", dur=0.25, concUnit="mg/L") iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24)) ; iAUC sNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, iAUC=iAUC, concUnit="mg/L") sNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Bolus", iAUC=iAUC, concUnit="mg/L") sNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Infusion", dur=0.25, iAUC=iAUC, concUnit="mg/L")
Calculate Area Under the Curve(AUC) and the first Moment Curve(AUMC) in two ways; 'linear trapezoidal method' or 'linear-up and log-down' method. Return a table of cumulative values.
AUC(x, y, down = "Linear")
AUC(x, y, down = "Linear")
x |
vector values of independent variable, usually time |
y |
vector values of dependent variable, usually concentration |
down |
either of |
down="Linear"
means linear trapezoidal rule with linear interpolation.
down="Log"
means linear-up and log-down method.
Table with two columns, AUC
and AUMC
; the first column values are cumulative AUCs and the second column values cumulative AUMCs.
Kyun-Seop Bae <[email protected]>
Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and Applications. 4th ed. pp687-689. 2011.
AUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"]) AUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"], down="Log")
AUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"]) AUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"], down="Log")
It sequentially fits (log(y) ~ x) from the last point of x to the previous points with at least 3 points. It chooses a slope the highest adjusted R-square. If the difference is less then 1e-4, it chooses longer slope.
BestSlope(x, y, adm = "Extravascular", TOL=1e-4)
BestSlope(x, y, adm = "Extravascular", TOL=1e-4)
x |
vector values of x-axis, usually time |
y |
vector values of y-axis, usually concentration |
adm |
one of |
TOL |
tolerance. See Phoneix WinNonlin 6.4 User's Guide p33 for the detail. |
Choosing the best terminal slope (y in log scale) in pharmacokinetic analysis is somewhat challenging, and it could vary by analysis performer. Pheonix WinNonlin chooses a slope with highest adjusted R-squared and the longest one. Difference of adjusted R-Squared less than TOL considered to be 0. This function uses ordinary least square method (OLS).
R2 |
R-squared |
R2ADJ |
adjusted R-squared |
LAMZNPT |
number of points used for slope |
LAMZ |
negative of slope, lambda_z |
b0 |
intercept of regression line |
CORRXY |
correlation of log(y) and x |
LAMZLL |
earliest x for lambda_z |
LAMZUL |
last x for lambda_z |
CLSTP |
predicted y value at last point, predicted concentration for the last time point |
Kyun-Seop Bae <[email protected]>
BestSlope(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"]) BestSlope(Indometh[Indometh$Subject==1, "time"], Indometh[Indometh$Subject==1, "conc"], adm="Bolus")
BestSlope(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"]) BestSlope(Indometh[Indometh$Subject==1, "time"], Indometh[Indometh$Subject==1, "conc"], adm="Bolus")
This function combines specified CDISC domain XPT files across the folders.
combXPT(folders, domain)
combXPT(folders, domain)
folders |
where to find specified CDISC domain XPT files |
domain |
domain XPT files to be comined across the folders |
You need to designate only one CDISC domain name. You may specify one or more folders to find the domain XPT files.
XPT |
combined table |
Kyun-Seop Bae <[email protected]>
This function compares NCA results usually from rNCA function
foreNCA(NCAres = "", PPTESTCD = "", PCTESTCD = "", title = "", ...)
foreNCA(NCAres = "", PPTESTCD = "", PCTESTCD = "", title = "", ...)
NCAres |
NCA results from rNCA function |
PPTESTCD |
CDISC SDTM PP domain Test Code to coompare |
PCTESTCD |
Molecular species to compare specified in PCTESTCD of CDISC SDTM PC domain |
title |
Title of the plot |
... |
further aguments to pass to the forestplot function |
This functio calls forestplot
in forest package.
Currently, this just plots.
Kyun-Seop Bae <[email protected]>
It performs a noncompartmental analysis with one subject data. This will be deprecated. Use sNCA()
instead.
IndiNCA(x, y, dose = 0, fit = "Linear", adm = "Extravascular", dur = 0, report = "Table", iAUC = "", uTime = "h", uConc = "ug/L", uDose = "mg")
IndiNCA(x, y, dose = 0, fit = "Linear", adm = "Extravascular", dur = 0, report = "Table", iAUC = "", uTime = "h", uConc = "ug/L", uDose = "mg")
x |
vector values of independent variable, usually time |
y |
vector values of dependent variable, usually concentration |
dose |
administered dose for the subject |
fit |
either of |
adm |
one of |
dur |
infusion duration for constant infusion, otherwise 0 |
report |
either of |
iAUC |
data.frame with three columns, "Name", "Start", "End" to specify the invervals for partial (interval) AUC |
uTime |
unit of time |
uConc |
unit of concentration |
uDose |
unit of dose |
This performs a noncompartmental analysis for a subject. It returns practically the same result with the most popular commercial software.
CMAX |
maximum concentration, Cmax |
CMAXD |
dose normalized Cmax, CMAX / Dose, Cmax / Dose |
TMAX |
time of maximum concentration, Tmax |
TLAG |
time to observe the first non-zero concentration, for extravascular administration only |
CLST |
last positive concentration observed, Clast |
CLSTP |
last positive concentration predicted, Clast_pred |
TLST |
time of last positive concentration, Tlast |
LAMZHL |
half-life by lambda z, ln(2)/LAMZ |
LAMZ |
lambda_z negative of best fit terminal slope |
LAMZLL |
earliest time for LAMZ |
LAMZUL |
last time for LAMZ |
LAMZNPT |
number of points for LAMZ |
CORRXY |
correlation of log(concentration) and time |
R2 |
R-squared |
R2ADJ |
R-squared adjusted |
C0 |
back extrapolated concentration at time 0, for bolus intravascular administration only |
AUCLST |
AUC from 0 to TLST |
AUCALL |
AUC using all the given points, including trailing zero concentrations |
AUCIFO |
AUC infinity observed |
AUCIFOD |
AUCIFO / Dose |
AUCIFP |
AUC infinity predicted using CLSTP instead of CLST |
AUCIFPD |
AUCIFP / Dose |
AUCPEO |
AUC % extrapolation observed |
AUCPEP |
AUC % extrapolated for AUCIFP |
AUCPBEO |
AUC % back extrapolation observed, for bolus IV administration only |
AUCPBEP |
AUC % back extrapolation predicted with AUCIFP, for bolus IV administration only |
AUMCLST |
AUMC to the TLST |
AUMCIFO |
AUMC infinity observed using CLST |
AUMCIFP |
AUMC infinity determined by CLSTP |
AUMCPEO |
AUMC % extrapolated observed |
AUMCPEP |
AUMC % extrapolated predicted |
MRTIVLST |
mean residence time (MRT) to TLST, for intravascular administration |
MRTIVIFO |
mean residence time (MRT) infinity using CLST, for intravascular administration |
MRTIVIFP |
mean residence time (MRT) infinity using CLSTP, for intravascular administration |
MRTEVLST |
mean residence time (MRT) to TLST, for extravascular administration |
MRTEVIFO |
mean residence time (MRT) infinity using CLST, for extravascular administration |
MRTEVIFP |
mean residence time (MRT) infinity using CLSTP, for extravascular administration |
VZO |
volume of distribution determined by LAMZ and AUCIFO, for intravascular administration |
VZP |
volume of distribution determined by LAMZ and AUCIFP, for intravascular administration |
VZFO |
VZO for extravascular administration, VZO/F, F is bioavailability |
VZFP |
VZP for extravascular administration, VZP/F, F is bioavailability |
CLO |
clearance using AUCIFO, for intravascular administration |
CLP |
clearance using AUCIFP, for intravascular administration |
CLFO |
CLO for extravascular administration, CLO/F, F is bioavailability |
CLFP |
CLP for extravascular administration, CLP/F, F is bioavailability |
VSSO |
volume of distribution at steady state using CLST, for intravascular administration only |
VSSP |
volume of distribution at stead state using CLSTP, for intravascular administration only |
Kyun-Seop Bae <[email protected]>
Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications. 5th ed. 2016.
Shargel L, Yu A. Applied Biopharmaceutics and Pharmacokinetics. 7th ed. 2015.
Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and Applications. 4th ed. 2011.
Gibaldi M, Perrier D. Pharmacokinetics. 2nd ed. revised and expanded. 1982.
IndiNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Bolus", uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Infusion", dur=0.25, uConc="mg/L") IndiNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, report="Text", uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Bolus", report="Text", uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Infusion", dur=0.25, report="Text", uConc="mg/L") iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24)) ; iAUC IndiNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, iAUC=iAUC, uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Bolus", iAUC=iAUC, uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Infusion", dur=0.25, iAUC=iAUC, uConc="mg/L")
IndiNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Bolus", uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Infusion", dur=0.25, uConc="mg/L") IndiNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, report="Text", uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Bolus", report="Text", uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Infusion", dur=0.25, report="Text", uConc="mg/L") iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24)) ; iAUC IndiNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, iAUC=iAUC, uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Bolus", iAUC=iAUC, uConc="mg/L") IndiNCA(Indometh[Indometh$Subject==1,"time"], Indometh[Indometh$Subject==1, "conc"], dose=25, adm="Infusion", dur=0.25, iAUC=iAUC, uConc="mg/L")
It calculates interval AUC
IntAUC(x, y, t1, t2, Res, down = "Linear")
IntAUC(x, y, t1, t2, Res, down = "Linear")
x |
vector values of independent variable, usually time |
y |
vector values of dependent variable, usually concentration |
t1 |
start time for AUC |
t2 |
end time for AUC |
Res |
result from |
down |
either of |
This calculates an interval (partial) AUC (from t1 to t2) with the given series of x and y.
If t1 and/or t2 cannot be found within x vector, it interpolates according to the down
option.
return interval AUC value (scalar)
Kyun-Seop Bae <[email protected]>
Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications. 5th ed. 2016.
Shargel L, Yu A. Applied Biopharmaceutics and Pharmacokinetics. 7th ed. 2015.
Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and Applications. 4th ed. 2011.
Gibaldi M, Perrier D. Pharmacokinetics. 2nd ed. revised and expanded. 1982.
Res = sNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, concUnit="mg/L") IntAUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"], t1=0.5, t2=11, Res)
Res = sNCA(Theoph[Theoph$Subject==1,"Time"], Theoph[Theoph$Subject==1, "conc"], dose=320, concUnit="mg/L") IntAUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"], t1=0.5, t2=11, Res)
It interpolates y value when a corresponding x value (xnew) does not exist within x vector
Interpol(x, y, xnew, Slope, b0, down = "Linear")
Interpol(x, y, xnew, Slope, b0, down = "Linear")
x |
vector values of x-axis, usually time |
y |
vector values of y-axis, usually concentration |
xnew |
new x point to be interpolated, usually new time point |
Slope |
slope of regression log(y) ~ x |
b0 |
y value of just left point of xnew |
down |
either of |
This function interpolate y value, if xnew is not in x vector.
If xnew is in x vector, it just returns the given x and y vector.
This function usually is called by IntAUC
function
Returned vector is sorted in the order of increasing x values.
new x and y vector containing xnew and ynew point
Kyun-Seop Bae <[email protected]>
x = 10:1 + 0.1 y = -2*x + 40.2 Interpol(x, y, 1.5) Interpol(x, y, 1.5, down="Log")
x = 10:1 + 0.1 y = -2*x + 40.2 Interpol(x, y, 1.5) Interpol(x, y, 1.5, down="Log")
It calculates AUC and AUMC using linear trapezoidal method
LinAUC(x, y)
LinAUC(x, y)
x |
vector values of independent variable, usually time |
y |
vector values of dependent variable, usually concentration |
This function returns AUC and AUMC by linear trapezoidal method.
AUC |
area under the curve |
AUMC |
area under the first moment curve |
Kyun-Seop Bae <[email protected]>
Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications. 5th ed. 2016.
Shargel L, Yu A. Applied Biopharmaceutics and Pharmacokinetics. 7th ed. 2015.
Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and Applications. 4th ed. 2011.
Gibaldi M, Perrier D. Pharmacokinetics. 2nd ed. revised and expanded. 1982.
LinAUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"]) AUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"]) # compare the last line
LinAUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"]) AUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"]) # compare the last line
This loads and returns EX and PC domain files in the specified folders
loadEXPC(folders)
loadEXPC(folders)
folders |
folders where to find EX and PC domain files |
This reads EX and PC domain files in the specified folder.
This calls readEX
and readPC
functions.
EX |
combined EX domain data |
PC |
combined PC doamin data |
Kyun-Seop Bae <[email protected]>
It calculates AUC and AUMC using linear-up log-down method
LogAUC(x, y)
LogAUC(x, y)
x |
vector values of independent variable, usually time |
y |
vector values of dependent variable, usually concentration |
This function returns AUC and AUMC by linear-up log-down method.
AUC |
area under the curve |
AUMC |
area under the first moment curve |
Kyun-Seop Bae <[email protected]>
Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications. 5th ed. 2016.
Shargel L, Yu A. Applied Biopharmaceutics and Pharmacokinetics. 7th ed. 2015.
Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and Applications. 4th ed. 2011.
Gibaldi M, Perrier D. Pharmacokinetics. 2nd ed. revised and expanded. 1982.
LogAUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"]) # Compare the last line with the above AUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"], down="Log")
LogAUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"]) # Compare the last line with the above AUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"], down="Log")
conduct noncompartmental analysis for many subjects in a data table
NCA(concData, id, Time, conc, trt="", fit = "Linear", dose = 0, adm = "Extravascular", dur = 0, report = "Table", iAUC = "", uTime = "h", uConc = "ug/L", uDose = "mg")
NCA(concData, id, Time, conc, trt="", fit = "Linear", dose = 0, adm = "Extravascular", dur = 0, report = "Table", iAUC = "", uTime = "h", uConc = "ug/L", uDose = "mg")
concData |
name of data table containing time-concentration data of multiple subjects |
id |
column name for subject ID |
Time |
column name for the time |
conc |
column name for the concentration |
trt |
column name for the treatment code. This is useful for crossover study like bioequivalence trial. |
fit |
one of |
dose |
administered dose. One should be careful for the unit. This can be a vector containing dose for each subject in order. |
adm |
one of |
dur |
infusion duration for constant infusion, otherwise 0. This can be a vector containing values for each subject in order. |
report |
either of |
iAUC |
data.frame with three columns, "Name", "Start", "End" to specify partial interval AUC |
uTime |
unit of time |
uConc |
unit of concentration |
uDose |
unit of dose |
This function calls IndiNCA
repeatedly to do NCA for each subject.
If you specify Report="Text"
, this function returns in free text format to be used in a report file.
CMAX |
maximum concentration, Cmax |
CMAXD |
dose normalized Cmax, CMAX / Dose, Cmax / Dose |
TMAX |
time of maximum concentration, Tmax |
TLAG |
time to observe the first non-zero concentration, for extravascular administration only |
CLST |
last positive concentration observed, Clast |
CLSTP |
last positive concentration predicted, Clast_pred |
TLST |
time of last positive concentration, Tlast |
LAMZHL |
half-life by lambda z, ln(2)/LAMZ |
LAMZ |
lambda_z negative of best fit terminal slope |
LAMZLL |
earliest time for LAMZ |
LAMZUL |
last time for LAMZ |
LAMZNPT |
number of points for LAMZ |
CORRXY |
correlation of log(concentration) and time |
R2 |
R-squared |
R2ADJ |
R-squared adjusted |
C0 |
back extrapolated concentration at time 0, for bolus intravascular administration only |
AUCLST |
AUC from 0 to TLST |
AUCALL |
AUC using all the given points, including trailing zero concentrations |
AUCIFO |
AUC infinity observed |
AUCIFOD |
AUCIFO / Dose |
AUCIFP |
AUC infinity predicted using CLSTP instead of CLST |
AUCIFPD |
AUCIFP / Dose |
AUCPEO |
AUC % extrapolation observed |
AUCPEP |
AUC % extrapolated for AUCIFP |
AUCPBEO |
AUC % back extrapolation observed, for bolus IV administration only |
AUCPBEP |
AUC % back extrapolation predicted with AUCIFP, for bolus IV administration only |
AUMCLST |
AUMC to the TLST |
AUMCIFO |
AUMC infinity observed using CLST |
AUMCIFP |
AUMC infinity determined by CLSTP |
AUMCPEO |
AUMC % extrapolated observed |
AUMCPEP |
AUMC % extrapolated predicted |
MRTIVLST |
mean residence time (MRT) to TLST, for intravascular administration |
MRTIVIFO |
mean residence time (MRT) infinity using CLST, for intravascular administration |
MRTIVIFP |
mean residence time (MRT) infinity using CLSTP, for intravascular administration |
MRTEVLST |
mean residence time (MRT) to TLST, for extravascular administration |
MRTEVIFO |
mean residence time (MRT) infinity using CLST, for extravascular administration |
MRTEVIFP |
mean residence time (MRT) infinity using CLSTP, for extravascular administration |
VZO |
volume of distribution determined by LAMZ and AUCIFO, for intravascular administration |
VZP |
volume of distribution determined by LAMZ and AUCIFP, for intravascular administration |
VZFO |
VZO for extravascular administration, VZO/F, F is bioavailability |
VZFP |
VZP for extravascular administration, VZP/F, F is bioavailability |
CLO |
clearance using AUCIFO, for intravascular administration |
CLP |
clearance using AUCIFP, for intravascular administration |
CLFO |
CLO for extravascular administration, CLO/F, F is bioavailability |
CLFP |
CLP for extravascular administration, CLP/F, F is bioavailability |
VSSO |
volume of distribution at steady state using CLST, for intravascular administration only |
VSSP |
volume of distribution at stead state using CLSTP, for intravascular administration only |
Kyun-Seop Bae <[email protected]>
Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications. 5th ed. 2016.
Shargel L, Yu A. Applied Biopharmaceutics and Pharmacokinetics. 7th ed. 2015.
Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and Applications. 4th ed. 2011.
Gibaldi M, Perrier D. Pharmacokinetics. 2nd ed. revised and expanded. 1982.
# Theoph and Indometh data: dose in mg, conc in mg/L, time in h NCA(Theoph, "Subject", "Time", "conc", dose=320, uConc="mg/L") NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", uConc="mg/L") iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24)) ; iAUC NCA(Theoph, "Subject", "Time", "conc", dose=320, iAUC=iAUC, uConc="mg/L") NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", iAUC=iAUC, uConc="mg/L") # writeLines(NCA(Theoph, "Subject", "Time", "conc", dose=320, report="Text", uConc="mg/L"), # "Theoph_Linear_CoreOutput.txt") # writeLines(NCA(Theoph, "Subject", "Time", "conc", dose=320, fit="Log", report="Text", # uConc="mg/L"), "Theoph_Log_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", report="Text", # uConc="mg/L"), "Indometh_Bolus_Linear_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", fit="Log", # report="Text", uConc="mg/L"), "Indometh_Bolus_Log_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Infusion", dur=0.25, # report="Text", uConc="mg/L"), "Indometh_Infusion_Linear_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Infusion", dur=0.25, # fit="Log", report="Text", uConc="mg/L"), "Indometh_Infusion_Log_CoreOutput.txt")
# Theoph and Indometh data: dose in mg, conc in mg/L, time in h NCA(Theoph, "Subject", "Time", "conc", dose=320, uConc="mg/L") NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", uConc="mg/L") iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24)) ; iAUC NCA(Theoph, "Subject", "Time", "conc", dose=320, iAUC=iAUC, uConc="mg/L") NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", iAUC=iAUC, uConc="mg/L") # writeLines(NCA(Theoph, "Subject", "Time", "conc", dose=320, report="Text", uConc="mg/L"), # "Theoph_Linear_CoreOutput.txt") # writeLines(NCA(Theoph, "Subject", "Time", "conc", dose=320, fit="Log", report="Text", # uConc="mg/L"), "Theoph_Log_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", report="Text", # uConc="mg/L"), "Indometh_Bolus_Linear_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Bolus", fit="Log", # report="Text", uConc="mg/L"), "Indometh_Bolus_Log_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Infusion", dur=0.25, # report="Text", uConc="mg/L"), "Indometh_Infusion_Linear_CoreOutput.txt") # writeLines(NCA(Indometh, "Subject", "time", "conc", dose=25, adm="Infusion", dur=0.25, # fit="Log", report="Text", uConc="mg/L"), "Indometh_Infusion_Log_CoreOutput.txt")
This performs Noncompartmental Analysis(NCA) for only one subject from the CDISC EX and PC domain.
NCA0(EX0, PC0, fit="Linear")
NCA0(EX0, PC0, fit="Linear")
EX0 |
Data of one subject from EX domain |
PC0 |
Data of one subject from PC domain |
fit |
either of |
This calls IndiNCA function. This is called by rNCA function.
This returns NCA results vector.
Kyun-Seop Bae <[email protected]>
This output NCA result in a pdf file.
pdfNCA(fileName = "Temp-NCA.pdf", concData, colSubj = "Subject", colTime = "Time", colConc = "conc", dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", concUnit = "ug/L", down="Linear", MW = 0)
pdfNCA(fileName = "Temp-NCA.pdf", concData, colSubj = "Subject", colTime = "Time", colConc = "conc", dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", concUnit = "ug/L", down="Linear", MW = 0)
fileName |
file name to save |
concData |
concentration data table |
colSubj |
column name for subject ID |
colTime |
column name for time |
colConc |
column name for concentration |
dose |
administered dose |
adm |
one of |
dur |
duration of infusion |
doseUnit |
unit of dose |
timeUnit |
unit of time |
concUnit |
unit of concentration |
down |
either of |
MW |
molecular weight of drug |
CMAX |
maximum concentration, Cmax |
CMAXD |
dose normalized Cmax, CMAX / Dose, Cmax / Dose |
TMAX |
time of maximum concentration, Tmax |
TLAG |
time to observe the first non-zero concentration, for extravascular administration only |
CLST |
last positive concentration observed, Clast |
CLSTP |
last positive concentration predicted, Clast_pred |
TLST |
time of last positive concentration, Tlast |
LAMZHL |
half-life by lambda z, ln(2)/LAMZ |
LAMZ |
lambda_z negative of best fit terminal slope |
LAMZLL |
earliest time for LAMZ |
LAMZUL |
last time for LAMZ |
LAMZNPT |
number of points for LAMZ |
CORRXY |
correlation of log(concentration) and time |
R2 |
R-squared |
R2ADJ |
R-squared adjusted |
C0 |
back extrapolated concentration at time 0, for bolus intravascular administration only |
AUCLST |
AUC from 0 to TLST |
AUCALL |
AUC using all the given points, including trailing zero concentrations |
AUCIFO |
AUC infinity observed |
AUCIFOD |
AUCIFO / Dose |
AUCIFP |
AUC infinity predicted using CLSTP instead of CLST |
AUCIFPD |
AUCIFP / Dose |
AUCPEO |
AUC % extrapolation observed |
AUCPEP |
AUC % extrapolated for AUCIFP |
AUCPBEO |
AUC % back extrapolation observed, for bolus IV administration only |
AUCPBEP |
AUC % back extrapolation predicted with AUCIFP, for bolus IV administration only |
AUMCLST |
AUMC to the TLST |
AUMCIFO |
AUMC infinity observed using CLST |
AUMCIFP |
AUMC infinity determined by CLSTP |
AUMCPEO |
AUMC % extrapolated observed |
AUMCPEP |
AUMC % extrapolated predicted |
MRTIVLST |
mean residence time (MRT) to TLST, for intravascular administration |
MRTIVIFO |
mean residence time (MRT) infinity using CLST, for intravascular administration |
MRTIVIFP |
mean residence time (MRT) infinity using CLSTP, for intravascular administration |
MRTEVLST |
mean residence time (MRT) to TLST, for extravascular administration |
MRTEVIFO |
mean residence time (MRT) infinity using CLST, for extravascular administration |
MRTEVIFP |
mean residence time (MRT) infinity using CLSTP, for extravascular administration |
VZO |
volume of distribution determined by LAMZ and AUCIFO, for intravascular administration |
VZP |
volume of distribution determined by LAMZ and AUCIFP, for intravascular administration |
VZFO |
VZO for extravascular administration, VZO/F, F is bioavailability |
VZFP |
VZP for extravascular administration, VZP/F, F is bioavailability |
CLO |
clearance using AUCIFO, for intravascular administration |
CLP |
clearance using AUCIFP, for intravascular administration |
CLFO |
CLO for extravascular administration, CLO/F, F is bioavailability |
CLFP |
CLP for extravascular administration, CLP/F, F is bioavailability |
VSSO |
volume of distribution at steady state using CLST, for intravascular administration only |
VSSP |
volume of distribution at stead state using CLSTP, for intravascular administration only |
Kyun-Seop Bae <[email protected]>
#pdfNCA(fileName="NCA-Theoph.pdf", Theoph, colSubj="Subject", colTime="Time", # colConc="conc", dose=320, doseUnit="mg", timeUnit="h", concUnit="mg/L") #pdfNCA(fileName="NCA-Indometh.pdf", Indometh, colSubj="Subject", colTime="time", # colConc="conc", adm="Infusion", dur=0.5, dose=25, doseUnit="mg", # timeUnit="h", concUnit="mg/L")
#pdfNCA(fileName="NCA-Theoph.pdf", Theoph, colSubj="Subject", colTime="Time", # colConc="conc", dose=320, doseUnit="mg", timeUnit="h", concUnit="mg/L") #pdfNCA(fileName="NCA-Indometh.pdf", Indometh, colSubj="Subject", colTime="time", # colConc="conc", adm="Infusion", dur=0.5, dose=25, doseUnit="mg", # timeUnit="h", concUnit="mg/L")
Automatically select best fit slope for the given x(usually time) and log(y)(usually concentration) values.
plotFit(concData, id, Time, conc, mol = "", adm = "Extravascular", ID = "", Mol = "")
plotFit(concData, id, Time, conc, mol = "", adm = "Extravascular", ID = "", Mol = "")
concData |
name of data table containing time-concentration data of multiple subjects |
id |
column name for subject ID |
Time |
column name for the time |
conc |
column name for the concentration |
mol |
column name for molecular species |
adm |
one of |
ID |
Subject ID for this plot |
Mol |
the name of molecular species to see |
Find the best fit slope then plot it.
Currently this function uses ordinary least square method(OLS) only.
This function calles BestSlope
function.
R2 |
R-squared |
R2ADJ |
adjusted R-squared |
LAMZNPT |
number of points used for slope |
LAMZ |
negative of slope, lambda_z |
b0 |
intercept of regression line |
CORRXY |
correlation of log(y) and x |
LAMZLL |
earliest x for lambda_z |
LAMZUL |
last x for lambda_z |
CLSTP |
predicted y value at last point, predicted concentration for the last time point |
Jee Eun Lee <[email protected]>
plotFit(Theoph, "Subject", "Time", "conc", ID="1") plotFit(Indometh, "Subject", "time", "conc", adm="Bolus", ID="1")
plotFit(Theoph, "Subject", "Time", "conc", ID="1") plotFit(Indometh, "Subject", "time", "conc", adm="Bolus", ID="1")
Generates individual and superposed concentration vs. time curve and save it in pdf files.
plotPK(concData, id, Time, conc, unitTime = "hr", unitConc = "ng/mL", trt = "", fit = "Linear", dose = 0, adm = "Extravascular", dur = 0, outdir = "Output")
plotPK(concData, id, Time, conc, unitTime = "hr", unitConc = "ng/mL", trt = "", fit = "Linear", dose = 0, adm = "Extravascular", dur = 0, outdir = "Output")
concData |
name of data table containing time-concentration data of multiple subjects |
id |
column name for subject ID |
Time |
column name for the time |
conc |
column name for the concentration |
unitTime |
unit for the time |
unitConc |
unit for the concentration |
trt |
column name for the treatment code. This is useful for crossover study like bioequivalence trial. |
fit |
one of |
dose |
administered dose. One should be careful for the unit. This can be a vector containing dose for each subject in order. |
adm |
one of |
dur |
infusion duration for constant infusion, otherwise 0. This can be a vector containing values for each subject in order. |
outdir |
name of the folder to be used for the output files |
This function generates plots for individual and summary concentration vs. time curve. This function calles NCA()
.
This function saves pdf files and tiff files in the outdir
folder.
Jee Eun Lee <[email protected]>
# plotPK(Theoph, "Subject", "Time", "conc", unitTime="hr", unitConc="mg/L", dose=320) # plotPK(Indometh, "Subject", "time", "conc", unitTime="hr", unitConc="mg/L", adm="Bolus", dose=25)
# plotPK(Theoph, "Subject", "Time", "conc", unitTime="hr", unitConc="mg/L", dose=320) # plotPK(Indometh, "Subject", "time", "conc", unitTime="hr", unitConc="mg/L", adm="Bolus", dose=25)
This reads EX domain files from the specified folders.
readEX(folders)
readEX(folders)
folders |
folders where to find EX doamin files |
This calls combXPT
function.
This is called by loadEXPC
function.
This returns combined table of EX doamin.
Kyun-Seop Bae <[email protected]>
This reads PC domain files from the specified folders.
readPC(folders)
readPC(folders)
folders |
folders where to find PC doamin files |
This calls combXPT
function.
This is called by loadEXPC
function.
This returns combined table of PC doamin.
Kyun-Seop Bae <[email protected]>
This performs NCA from the CDISC EX and PC datasets.
rNCA(ex, pc, study = "", trt = "", id = "", analyte = "", codeBQL = c("< 0", "<0", "NQ", "BLQ", "BQL", "BQoL", "<LOQ"), fit="Linear", MinPoints = 5)
rNCA(ex, pc, study = "", trt = "", id = "", analyte = "", codeBQL = c("< 0", "<0", "NQ", "BLQ", "BQL", "BQoL", "<LOQ"), fit="Linear", MinPoints = 5)
ex |
EX domain data, usually from the |
pc |
PC domain data, usually form the |
study |
vector of study names in EX and PC domain to do NCA |
trt |
vector of treatment names in EXTRT to do NCA |
id |
vector of subject IDs in USUBJID to do NCA |
analyte |
vector of molecular species in PCTESTCD to do NCA |
codeBQL |
symbols of below the quantitation limit |
fit |
either of |
MinPoints |
minimum number of sampling points for NCA |
This calls NCA0. Results of this can be further processed by foreNCA to plot and compare between studies and dose groups.
This returns a table of NCA results
Kyun-Seop Bae <[email protected]>
This is an ordinary rounding function, so called round half away from zero
Round(x, n = 0)
Round(x, n = 0)
x |
numeric to be rounded |
n |
indicating decimal digits |
The function round
in R base rounds to the even number, i.e. round(0.5)
is 0 not 1.
If you want rounding 0.5 be 1, you can use this Round
function.
This function is for the consistency with other software like MS-Excel, SAS.
ordinarily rounded value
Kyun-Seop Bae <[email protected]>
See wikipedia subject "Rounding"
(x = 1:10 - 0.5) Round(x) round(x) # compare with the above
(x = 1:10 - 0.5) Round(x) round(x) # compare with the above
Contains the names and order of colum of return table/text by IndiNCA
and NCA
functions
RptCfg
RptCfg
A data frame with 48 observations on the following 10 variables.
PPTESTCD
a character vector of CDISC SDTM PPTESTCD
SYNONYM
a character vector of CDISC SDTM PPTESTCD Synonym
NCI
a character vector of NCI peferred terms
WNL
a character vector of WinNonlin(R) software variables
ExtravascularDefault
a numeric vector of ordering in report for extravascular administration, Zero means exclusion in the report.
ExtravascularWNL
a numeric vector of WinNonlin(R) style ordering in report for extravascular administration, Zero means exclusion in the report.
BolusDefault
a numeric vector of ordering in report for extravascular administration, Zero means exclusion in the report.
BolusWNL
a numeric vector of WinNonlin(R) style ordering in report for extravascular administration, Zero means exclusion in the report.
InfusionDefault
a numeric vector of ordering in report for extravascular administration, Zero means exclusion in the report.
InfusionWNL
a numeric vector of WinNonlin(R) style ordering in report for extravascular administration, Zero means exclusion in the report.
This table should exist in pkr package. User can edit this table for shaping the report in one's own style.
This output NCA result in a rtf file.
rtfNCA(fileName = "Temp-NCA.rtf", concData, colSubj = "Subject", colTime = "Time", colConc = "conc", dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", concUnit = "ug/L", down="Linear", MW = 0)
rtfNCA(fileName = "Temp-NCA.rtf", concData, colSubj = "Subject", colTime = "Time", colConc = "conc", dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", concUnit = "ug/L", down="Linear", MW = 0)
fileName |
file name to save |
concData |
concentration data table |
colSubj |
column name for subject ID |
colTime |
column name for time |
colConc |
column name for concentration |
dose |
administered dose |
adm |
one of |
dur |
duration of infusion |
doseUnit |
unit of dose |
timeUnit |
unit of time |
concUnit |
unit of concentration |
down |
either of |
MW |
molecular weight of drug |
CMAX |
maximum concentration, Cmax |
CMAXD |
dose normalized Cmax, CMAX / Dose, Cmax / Dose |
TMAX |
time of maximum concentration, Tmax |
TLAG |
time to observe the first non-zero concentration, for extravascular administration only |
CLST |
last positive concentration observed, Clast |
CLSTP |
last positive concentration predicted, Clast_pred |
TLST |
time of last positive concentration, Tlast |
LAMZHL |
half-life by lambda z, ln(2)/LAMZ |
LAMZ |
lambda_z negative of best fit terminal slope |
LAMZLL |
earliest time for LAMZ |
LAMZUL |
last time for LAMZ |
LAMZNPT |
number of points for LAMZ |
CORRXY |
correlation of log(concentration) and time |
R2 |
R-squared |
R2ADJ |
R-squared adjusted |
C0 |
back extrapolated concentration at time 0, for bolus intravascular administration only |
AUCLST |
AUC from 0 to TLST |
AUCALL |
AUC using all the given points, including trailing zero concentrations |
AUCIFO |
AUC infinity observed |
AUCIFOD |
AUCIFO / Dose |
AUCIFP |
AUC infinity predicted using CLSTP instead of CLST |
AUCIFPD |
AUCIFP / Dose |
AUCPEO |
AUC % extrapolation observed |
AUCPEP |
AUC % extrapolated for AUCIFP |
AUCPBEO |
AUC % back extrapolation observed, for bolus IV administration only |
AUCPBEP |
AUC % back extrapolation predicted with AUCIFP, for bolus IV administration only |
AUMCLST |
AUMC to the TLST |
AUMCIFO |
AUMC infinity observed using CLST |
AUMCIFP |
AUMC infinity determined by CLSTP |
AUMCPEO |
AUMC % extrapolated observed |
AUMCPEP |
AUMC % extrapolated predicted |
MRTIVLST |
mean residence time (MRT) to TLST, for intravascular administration |
MRTIVIFO |
mean residence time (MRT) infinity using CLST, for intravascular administration |
MRTIVIFP |
mean residence time (MRT) infinity using CLSTP, for intravascular administration |
MRTEVLST |
mean residence time (MRT) to TLST, for extravascular administration |
MRTEVIFO |
mean residence time (MRT) infinity using CLST, for extravascular administration |
MRTEVIFP |
mean residence time (MRT) infinity using CLSTP, for extravascular administration |
VZO |
volume of distribution determined by LAMZ and AUCIFO, for intravascular administration |
VZP |
volume of distribution determined by LAMZ and AUCIFP, for intravascular administration |
VZFO |
VZO for extravascular administration, VZO/F, F is bioavailability |
VZFP |
VZP for extravascular administration, VZP/F, F is bioavailability |
CLO |
clearance using AUCIFO, for intravascular administration |
CLP |
clearance using AUCIFP, for intravascular administration |
CLFO |
CLO for extravascular administration, CLO/F, F is bioavailability |
CLFP |
CLP for extravascular administration, CLP/F, F is bioavailability |
VSSO |
volume of distribution at steady state using CLST, for intravascular administration only |
VSSP |
volume of distribution at stead state using CLSTP, for intravascular administration only |
Kyun-Seop Bae <[email protected]>
#rtfNCA(fileName="NCA-Theoph.rtf", Theoph, colSubj="Subject", colTime="Time", # colConc="conc", dose=320, doseUnit="mg", timeUnit="h", concUnit="mg/L") #rtfNCA(fileName="NCA-Indometh.rtf", Indometh, colSubj="Subject", colTime="time", # colConc="conc", adm="Infusion", dur=0.5, dose=25, doseUnit="mg", # timeUnit="h", concUnit="mg/L")
#rtfNCA(fileName="NCA-Theoph.rtf", Theoph, colSubj="Subject", colTime="Time", # colConc="conc", dose=320, doseUnit="mg", timeUnit="h", concUnit="mg/L") #rtfNCA(fileName="NCA-Indometh.rtf", Indometh, colSubj="Subject", colTime="time", # colConc="conc", adm="Infusion", dur=0.5, dose=25, doseUnit="mg", # timeUnit="h", concUnit="mg/L")
It calculates the slope with linear regression of log(y) ~ x
Slope(x, y)
Slope(x, y)
x |
vector values of independent variable, usually time |
y |
vector values of dependent variable, usually concentration |
With time-concentration curve, you frequently need to estimate slope in log(concentration) ~ time.
This function is usually called by BestSlope
function and you seldom need to call this function directly.
R2 |
R-squared |
R2ADJ |
adjusted R-squared |
LAMZNPT |
number of points used for slope |
LAMZ |
negative of slope, lambda_z |
b0 |
intercept of regression line |
CORRXY |
correlation of log(y) and x |
LAMZLL |
earliest x for lambda_z |
LAMZUL |
last x for lambda_z |
CLSTP |
predicted y value at last point, predicted concentration for the last time point |
Kyun-Seop Bae <[email protected]>
Slope(Indometh[Indometh$Subject==1, "time"], Indometh[Indometh$Subject==1, "conc"])
Slope(Indometh[Indometh$Subject==1, "time"], Indometh[Indometh$Subject==1, "conc"])
This is the work-horse function for NCA.
sNCA(x, y, dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", concUnit = "ug/L", iAUC = "", down = "Linear", MW = 0, returnNA = TRUE)
sNCA(x, y, dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", concUnit = "ug/L", iAUC = "", down = "Linear", MW = 0, returnNA = TRUE)
x |
usually time |
y |
usually concentration |
dose |
given amount |
adm |
one of |
dur |
duration of infusion |
doseUnit |
unit of dose |
timeUnit |
unit of time |
concUnit |
unit of concentration |
iAUC |
interval AUCs to calculate |
down |
either of |
MW |
molecular weight of the drug |
returnNA |
if |
This will replace IndiNCA
.
CMAX |
maximum concentration, Cmax |
CMAXD |
dose normalized Cmax, CMAX / Dose, Cmax / Dose |
TMAX |
time of maximum concentration, Tmax |
TLAG |
time to observe the first non-zero concentration, for extravascular administration only |
CLST |
last positive concentration observed, Clast |
CLSTP |
last positive concentration predicted, Clast_pred |
TLST |
time of last positive concentration, Tlast |
LAMZHL |
half-life by lambda z, ln(2)/LAMZ |
LAMZ |
lambda_z negative of best fit terminal slope |
LAMZLL |
earliest time for LAMZ |
LAMZUL |
last time for LAMZ |
LAMZNPT |
number of points for LAMZ |
CORRXY |
correlation of log(concentration) and time |
R2 |
R-squared |
R2ADJ |
R-squared adjusted |
C0 |
back extrapolated concentration at time 0, for bolus intravascular administration only |
AUCLST |
AUC from 0 to TLST |
AUCALL |
AUC using all the given points, including trailing zero concentrations |
AUCIFO |
AUC infinity observed |
AUCIFOD |
AUCIFO / Dose |
AUCIFP |
AUC infinity predicted using CLSTP instead of CLST |
AUCIFPD |
AUCIFP / Dose |
AUCPEO |
AUC % extrapolation observed |
AUCPEP |
AUC % extrapolated for AUCIFP |
AUCPBEO |
AUC % back extrapolation observed, for bolus IV administration only |
AUCPBEP |
AUC % back extrapolation predicted with AUCIFP, for bolus IV administration only |
AUMCLST |
AUMC to the TLST |
AUMCIFO |
AUMC infinity observed using CLST |
AUMCIFP |
AUMC infinity determined by CLSTP |
AUMCPEO |
AUMC % extrapolated observed |
AUMCPEP |
AUMC % extrapolated predicted |
MRTIVLST |
mean residence time (MRT) to TLST, for intravascular administration |
MRTIVIFO |
mean residence time (MRT) infinity using CLST, for intravascular administration |
MRTIVIFP |
mean residence time (MRT) infinity using CLSTP, for intravascular administration |
MRTEVLST |
mean residence time (MRT) to TLST, for extravascular administration |
MRTEVIFO |
mean residence time (MRT) infinity using CLST, for extravascular administration |
MRTEVIFP |
mean residence time (MRT) infinity using CLSTP, for extravascular administration |
VZO |
volume of distribution determined by LAMZ and AUCIFO, for intravascular administration |
VZP |
volume of distribution determined by LAMZ and AUCIFP, for intravascular administration |
VZFO |
VZO for extravascular administration, VZO/F, F is bioavailability |
VZFP |
VZP for extravascular administration, VZP/F, F is bioavailability |
CLO |
clearance using AUCIFO, for intravascular administration |
CLP |
clearance using AUCIFP, for intravascular administration |
CLFO |
CLO for extravascular administration, CLO/F, F is bioavailability |
CLFP |
CLP for extravascular administration, CLP/F, F is bioavailability |
VSSO |
volume of distribution at steady state using CLST, for intravascular administration only |
VSSP |
volume of distribution at steady state using CLSTP, for intravascular administration only |
Kyun-Seop Bae <[email protected]>
Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications. 5th ed. 2016.
# For one subject x = Theoph[Theoph$Subject=="1","Time"] y = Theoph[Theoph$Subject=="1","conc"] sNCA(x, y, dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h") sNCA(x, y, dose=320, concUnit="mg/L", returnNA=FALSE) iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24)) sNCA(x, y, dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h", iAUC=iAUC) MW = 180.164 # Molecular weight of theophylline sNCA(x, y/MW, dose=320, doseUnit="mg", concUnit="mmol/L", timeUnit="h") sNCA(x, y/MW, dose=320, doseUnit="mg", concUnit="mmol/L", timeUnit="h", MW=MW) sNCA(x, y, dose=320/MW, doseUnit="mmol", concUnit="mg/L", timeUnit="h", MW=MW) sNCA(x, y/MW, dose=320/MW, doseUnit="mmol", concUnit="mmol/L", timeUnit="h", MW=MW) sNCA(x, y/MW, dose=320/MW, doseUnit="mmol", concUnit="mmol/L", timeUnit="h", MW=MW, returnNA=FALSE) sNCA(x, y/MW, doseUnit="mmol", concUnit="mmol/L", timeUnit="h", MW=MW, returnNA=FALSE) sNCA(x, y/MW, dose=as.numeric(NA), doseUnit="mmol", concUnit="mmol/L", timeUnit="h", MW=MW, returnNA=FALSE) sNCA(x, y, dose=320, concUnit="mg/L", timeUnit="hr") sNCA(x*60, y, dose=320, concUnit="mg/L", timeUnit="min")
# For one subject x = Theoph[Theoph$Subject=="1","Time"] y = Theoph[Theoph$Subject=="1","conc"] sNCA(x, y, dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h") sNCA(x, y, dose=320, concUnit="mg/L", returnNA=FALSE) iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24)) sNCA(x, y, dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h", iAUC=iAUC) MW = 180.164 # Molecular weight of theophylline sNCA(x, y/MW, dose=320, doseUnit="mg", concUnit="mmol/L", timeUnit="h") sNCA(x, y/MW, dose=320, doseUnit="mg", concUnit="mmol/L", timeUnit="h", MW=MW) sNCA(x, y, dose=320/MW, doseUnit="mmol", concUnit="mg/L", timeUnit="h", MW=MW) sNCA(x, y/MW, dose=320/MW, doseUnit="mmol", concUnit="mmol/L", timeUnit="h", MW=MW) sNCA(x, y/MW, dose=320/MW, doseUnit="mmol", concUnit="mmol/L", timeUnit="h", MW=MW, returnNA=FALSE) sNCA(x, y/MW, doseUnit="mmol", concUnit="mmol/L", timeUnit="h", MW=MW, returnNA=FALSE) sNCA(x, y/MW, dose=as.numeric(NA), doseUnit="mmol", concUnit="mmol/L", timeUnit="h", MW=MW, returnNA=FALSE) sNCA(x, y, dose=320, concUnit="mg/L", timeUnit="hr") sNCA(x*60, y, dose=320, concUnit="mg/L", timeUnit="min")
do multiple NCA and returns a result table.
tblNCA(concData, key = "Subject", colTime = "Time", colConc = "conc", dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", concUnit = "ug/L", down = "Linear", MW = 0, returnNA = FALSE)
tblNCA(concData, key = "Subject", colTime = "Time", colConc = "conc", dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", concUnit = "ug/L", down = "Linear", MW = 0, returnNA = FALSE)
concData |
concentration data table |
key |
column names of concData to be shown at the output table |
colTime |
column name for time |
colConc |
column name for concentration |
dose |
administered dose |
adm |
one of |
dur |
duration of infusion |
doseUnit |
unit of dose |
timeUnit |
unit of time |
concUnit |
unit of concentration |
down |
method to calculate AUC, |
MW |
molecular weight of drug |
returnNA |
if |
Basically same with sNCA
Kyun-Seop Bae <[email protected]>
tblNCA(Theoph, key="Subject", dose=320, concUnit="mg/L") tblNCA(Indometh, key="Subject", colTime="time", colConc="conc", dose=25, adm="Infusion", dur=0.5, concUnit="mg/L")
tblNCA(Theoph, key="Subject", dose=320, concUnit="mg/L") tblNCA(Indometh, key="Subject", colTime="time", colConc="conc", dose=25, adm="Infusion", dur=0.5, concUnit="mg/L")
This is the text form output.
txtNCA(x, y, dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", concUnit = "ug/L", iAUC = "", down="Linear", MW = 0, returnNA = FALSE)
txtNCA(x, y, dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", concUnit = "ug/L", iAUC = "", down="Linear", MW = 0, returnNA = FALSE)
x |
usually time |
y |
usually concentration |
dose |
given amount |
adm |
one of |
dur |
duration of infusion |
doseUnit |
unit of dose |
timeUnit |
unit of time |
concUnit |
unit of concentration |
iAUC |
interval AUCs to calculate |
down |
either of |
MW |
molecular weight of the drug |
returnNA |
if |
CMAX |
maximum concentration, Cmax |
CMAXD |
dose normalized Cmax, CMAX / Dose, Cmax / Dose |
TMAX |
time of maximum concentration, Tmax |
TLAG |
time to observe the first non-zero concentration, for extravascular administration only |
CLST |
last positive concentration observed, Clast |
CLSTP |
last positive concentration predicted, Clast_pred |
TLST |
time of last positive concentration, Tlast |
LAMZHL |
half-life by lambda z, ln(2)/LAMZ |
LAMZ |
lambda_z negative of best fit terminal slope |
LAMZLL |
earliest time for LAMZ |
LAMZUL |
last time for LAMZ |
LAMZNPT |
number of points for LAMZ |
CORRXY |
correlation of log(concentration) and time |
R2 |
R-squared |
R2ADJ |
R-squared adjusted |
C0 |
back extrapolated concentration at time 0, for bolus intravascular administration only |
AUCLST |
AUC from 0 to TLST |
AUCALL |
AUC using all the given points, including trailing zero concentrations |
AUCIFO |
AUC infinity observed |
AUCIFOD |
AUCIFO / Dose |
AUCIFP |
AUC infinity predicted using CLSTP instead of CLST |
AUCIFPD |
AUCIFP / Dose |
AUCPEO |
AUC % extrapolation observed |
AUCPEP |
AUC % extrapolated for AUCIFP |
AUCPBEO |
AUC % back extrapolation observed, for bolus IV administration only |
AUCPBEP |
AUC % back extrapolation predicted with AUCIFP, for bolus IV administration only |
AUMCLST |
AUMC to the TLST |
AUMCIFO |
AUMC infinity observed using CLST |
AUMCIFP |
AUMC infinity determined by CLSTP |
AUMCPEO |
AUMC % extrapolated observed |
AUMCPEP |
AUMC % extrapolated predicted |
MRTIVLST |
mean residence time (MRT) to TLST, for intravascular administration |
MRTIVIFO |
mean residence time (MRT) infinity using CLST, for intravascular administration |
MRTIVIFP |
mean residence time (MRT) infinity using CLSTP, for intravascular administration |
MRTEVLST |
mean residence time (MRT) to TLST, for extravascular administration |
MRTEVIFO |
mean residence time (MRT) infinity using CLST, for extravascular administration |
MRTEVIFP |
mean residence time (MRT) infinity using CLSTP, for extravascular administration |
VZO |
volume of distribution determined by LAMZ and AUCIFO, for intravascular administration |
VZP |
volume of distribution determined by LAMZ and AUCIFP, for intravascular administration |
VZFO |
VZO for extravascular administration, VZO/F, F is bioavailability |
VZFP |
VZP for extravascular administration, VZP/F, F is bioavailability |
CLO |
clearance using AUCIFO, for intravascular administration |
CLP |
clearance using AUCIFP, for intravascular administration |
CLFO |
CLO for extravascular administration, CLO/F, F is bioavailability |
CLFP |
CLP for extravascular administration, CLP/F, F is bioavailability |
VSSO |
volume of distribution at steady state using CLST, for intravascular administration only |
VSSP |
volume of distribution at stead state using CLSTP, for intravascular administration only |
Kyun-Seop Bae <[email protected]>
# For one subject txtNCA(Theoph[Theoph$Subject=="1","Time"], Theoph[Theoph$Subject=="1","conc"], dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h") # or equivalently x = Theoph[Theoph$Subject=="1","Time"] y = Theoph[Theoph$Subject=="1","conc"] txtNCA(x, y, dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h") # For all subjects IDs = sort(as.numeric(unique(Theoph[,"Subject"]))) nID = length(IDs) Res = vector() for (i in 1:nID) { tRes = txtNCA(Theoph[Theoph[,"Subject"]==IDs[i],"Time"], Theoph[Theoph[,"Subject"]==IDs[i],"conc"], dose=320, concUnit="mg/L", returnNA=FALSE) tRes = c(paste("ID =", IDs[i]), tRes, "") Res = c(Res, tRes) } Res
# For one subject txtNCA(Theoph[Theoph$Subject=="1","Time"], Theoph[Theoph$Subject=="1","conc"], dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h") # or equivalently x = Theoph[Theoph$Subject=="1","Time"] y = Theoph[Theoph$Subject=="1","conc"] txtNCA(x, y, dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h") # For all subjects IDs = sort(as.numeric(unique(Theoph[,"Subject"]))) nID = length(IDs) Res = vector() for (i in 1:nID) { tRes = txtNCA(Theoph[Theoph[,"Subject"]==IDs[i],"Time"], Theoph[Theoph[,"Subject"]==IDs[i],"conc"], dose=320, concUnit="mg/L", returnNA=FALSE) tRes = c(paste("ID =", IDs[i]), tRes, "") Res = c(Res, tRes) } Res
It displays CDISC PP output units and multiplication factor for them.
Unit(code = "", timeUnit = "h", concUnit = "ng/mL", doseUnit = "mg", MW = 0)
Unit(code = "", timeUnit = "h", concUnit = "ng/mL", doseUnit = "mg", MW = 0)
code |
vector of PPTESTCD |
timeUnit |
unit of time |
concUnit |
unit of concentration |
doseUnit |
unit of dose |
MW |
molecular weight of drug |
row names |
PPTESTCD |
Unit |
unit |
Factor |
internal mulitpilcation factor |
Kyun-Seop Bae <[email protected]>
Unit(concUnit="ug/L", doseUnit="mg") Unit(concUnit="ng/L", doseUnit="mg") Unit(concUnit="umol/L", doseUnit="mmol") Unit(concUnit="nmol/L", doseUnit="mmol") Unit(concUnit="mmol/L", doseUnit="mg", MW=500) Unit(concUnit="umol/L", doseUnit="mg", MW=500) Unit(concUnit="nmol/L", doseUnit="mg", MW=500) Unit(concUnit="nmol/mL", doseUnit="mg", MW=500) Unit(concUnit="ug/L", doseUnit="mmol", MW=500) Unit(concUnit="ug/L", doseUnit="mol", MW=500) Unit(concUnit="ng/L", doseUnit="mmol", MW=500) Unit(concUnit="ng/mL", doseUnit="mmol", MW=500) Unit(concUnit="nmol/L", doseUnit="mg") Unit(concUnit="ug/L", doseUnit="mmol")
Unit(concUnit="ug/L", doseUnit="mg") Unit(concUnit="ng/L", doseUnit="mg") Unit(concUnit="umol/L", doseUnit="mmol") Unit(concUnit="nmol/L", doseUnit="mmol") Unit(concUnit="mmol/L", doseUnit="mg", MW=500) Unit(concUnit="umol/L", doseUnit="mg", MW=500) Unit(concUnit="nmol/L", doseUnit="mg", MW=500) Unit(concUnit="nmol/mL", doseUnit="mg", MW=500) Unit(concUnit="ug/L", doseUnit="mmol", MW=500) Unit(concUnit="ug/L", doseUnit="mol", MW=500) Unit(concUnit="ng/L", doseUnit="mmol", MW=500) Unit(concUnit="ng/mL", doseUnit="mmol", MW=500) Unit(concUnit="nmol/L", doseUnit="mg") Unit(concUnit="ug/L", doseUnit="mmol")