Version: | 0.1.3 |
Date: | 2022-06-10 |
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). |
Depends: | R (≥ 2.0.0), foreign, binr, forestplot, rtf |
Author: | Kyun-Seop Bae [aut], Jee Eun Lee [aut] |
Maintainer: | Kyun-Seop Bae <k@acr.kr> |
Copyright: | 2017, Kyun-Seop Bae, Jee Eun Lee |
License: | GPL-3 |
NeedsCompilation: | no |
Repository: | CRAN |
URL: | https://cran.r-project.org/package=pkr |
Packaged: | 2022-06-11 08:05:56 UTC; Kyun-SeopBae |
Date/Publication: | 2022-06-11 08:20:02 UTC |
Pharmacokinetics in R
Description
It conducts a noncompartmental analysis(NCA) as closely as possible to the most widely used commercial pharmacokinetic analysis software.
Details
The main functions are
NCA to perform NCA for many subjects. IndiNCA to perform NCA for one subject.
Author(s)
Kyun-Seop Bae <k@acr.kr>, Jee Eun Lee <JeeEun.Lee@fda.hhs.gov>
References
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.
Examples
# 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 Area Under the first Moment Curve (AUMC) in a table format
Description
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.
Usage
AUC(x, y, down = "Linear")
Arguments
x |
vector values of independent variable, usually time |
y |
vector values of dependent variable, usually concentration |
down |
either of |
Details
down="Linear"
means linear trapezoidal rule with linear interpolation.
down="Log"
means linear-up and log-down method.
Value
Table with two columns, AUC
and AUMC
; the first column values are cumulative AUCs and the second column values cumulative AUMCs.
Author(s)
Kyun-Seop Bae <k@acr.kr>
References
Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and Applications. 4th ed. pp687-689. 2011.
See Also
Examples
AUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"])
AUC(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"], down="Log")
Internal Functions
Description
Internal functions
Details
These are not to be called by the user.
Choose best fit slope for the log(y) and x regression by the criteria of adjusted R-square
Description
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.
Usage
BestSlope(x, y, adm = "Extravascular", TOL=1e-4)
Arguments
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. |
Details
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).
Value
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 |
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Examples
BestSlope(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"])
BestSlope(Indometh[Indometh$Subject==1, "time"], Indometh[Indometh$Subject==1, "conc"],
adm="Bolus")
Noncompartmental Analysis for an Individual
Description
It performs a noncompartmental analysis with one subject data. This will be deprecated. Use sNCA()
instead.
Usage
IndiNCA(x, y, dose = 0, fit = "Linear", adm = "Extravascular", dur = 0,
report = "Table", iAUC = "", uTime = "h", uConc = "ug/L", uDose = "mg")
Arguments
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 |
Details
This performs a noncompartmental analysis for a subject. It returns practically the same result with the most popular commercial software.
Value
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 |
Author(s)
Kyun-Seop Bae <k@acr.kr>
References
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.
See Also
Examples
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")
Calculate interval AUC
Description
It calculates interval AUC
Usage
IntAUC(x, y, t1, t2, Res, down = "Linear")
Arguments
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 |
Details
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.
Value
return interval AUC value (scalar)
Author(s)
Kyun-Seop Bae <k@acr.kr>
References
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.
See Also
Examples
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)
Interpolate y value
Description
It interpolates y value when a corresponding x value (xnew) does not exist within x vector
Usage
Interpol(x, y, xnew, Slope, b0, down = "Linear")
Arguments
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 |
Details
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.
Value
new x and y vector containing xnew and ynew point
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Examples
x = 10:1 + 0.1
y = -2*x + 40.2
Interpol(x, y, 1.5)
Interpol(x, y, 1.5, down="Log")
Area Under the Curve(AUC) and Area Under the first Moment Curve(AUMC) by linear trapezoidal method
Description
It calculates AUC and AUMC using linear trapezoidal method
Usage
LinAUC(x, y)
Arguments
x |
vector values of independent variable, usually time |
y |
vector values of dependent variable, usually concentration |
Details
This function returns AUC and AUMC by linear trapezoidal method.
Value
AUC |
area under the curve |
AUMC |
area under the first moment curve |
Author(s)
Kyun-Seop Bae <k@acr.kr>
References
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.
See Also
Examples
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
Area Under the Curve(AUC) and Area Under the first Moment Curve(AUMC) by linear-up log-down method
Description
It calculates AUC and AUMC using linear-up log-down method
Usage
LogAUC(x, y)
Arguments
x |
vector values of independent variable, usually time |
y |
vector values of dependent variable, usually concentration |
Details
This function returns AUC and AUMC by linear-up log-down method.
Value
AUC |
area under the curve |
AUMC |
area under the first moment curve |
Author(s)
Kyun-Seop Bae <k@acr.kr>
References
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.
See Also
Examples
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")
Noncompartmental analysis for a dataset with multiple subjects
Description
conduct noncompartmental analysis for many subjects in a data table
Usage
NCA(concData, id, Time, conc, trt="", fit = "Linear", dose = 0,
adm = "Extravascular", dur = 0, report = "Table", iAUC = "",
uTime = "h", uConc = "ug/L", uDose = "mg")
Arguments
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 |
Details
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.
Value
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 |
Author(s)
Kyun-Seop Bae <k@acr.kr>
References
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.
See Also
Examples
# 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")
NCA of SDTM data for single subject
Description
This performs Noncompartmental Analysis(NCA) for only one subject from the CDISC EX and PC domain.
Usage
NCA0(EX0, PC0, fit="Linear")
Arguments
EX0 |
Data of one subject from EX domain |
PC0 |
Data of one subject from PC domain |
fit |
either of |
Details
This calls IndiNCA function. This is called by rNCA function.
Value
This returns NCA results vector.
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Round Half Away from Zero
Description
This is an ordinary rounding function, so called round half away from zero
Usage
Round(x, n = 0)
Arguments
x |
numeric to be rounded |
n |
indicating decimal digits |
Details
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.
Value
ordinarily rounded value
Author(s)
Kyun-Seop Bae <k@acr.kr>
References
See wikipedia subject "Rounding"
Examples
(x = 1:10 - 0.5)
Round(x)
round(x) # compare with the above
NCA Report Configuation Table
Description
Contains the names and order of colum of return table/text by IndiNCA
and NCA
functions
Usage
RptCfg
Format
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.
Details
This table should exist in pkr package. User can edit this table for shaping the report in one's own style.
Get the Slope of regression log(y) ~ x
Description
It calculates the slope with linear regression of log(y) ~ x
Usage
Slope(x, y)
Arguments
x |
vector values of independent variable, usually time |
y |
vector values of dependent variable, usually concentration |
Details
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.
Value
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 |
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Examples
Slope(Indometh[Indometh$Subject==1, "time"], Indometh[Indometh$Subject==1, "conc"])
Internal Functions
Description
Internal functions
Details
These are not to be called by the user.
Internal Functions
Description
Internal functions
Details
These are not to be called by the user.
Disply CDISC standard units and multiplied factor of NCA results
Description
It displays CDISC PP output units and multiplication factor for them.
Usage
Unit(code = "", timeUnit = "h", concUnit = "ng/mL", doseUnit = "mg", MW = 0)
Arguments
code |
vector of PPTESTCD |
timeUnit |
unit of time |
concUnit |
unit of concentration |
doseUnit |
unit of dose |
MW |
molecular weight of drug |
Value
row names |
PPTESTCD |
Unit |
unit |
Factor |
internal mulitpilcation factor |
Author(s)
Kyun-Seop Bae <k@acr.kr>
Examples
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")
Combine XPT files
Description
This function combines specified CDISC domain XPT files across the folders.
Usage
combXPT(folders, domain)
Arguments
folders |
where to find specified CDISC domain XPT files |
domain |
domain XPT files to be comined across the folders |
Details
You need to designate only one CDISC domain name. You may specify one or more folders to find the domain XPT files.
Value
XPT |
combined table |
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Convert intermeidate NCA result to adequate unit.
Description
This is an internal function
Author(s)
Kyun-Seop Bae <k@acr.kr>
Forest plot to compare NCA results
Description
This function compares NCA results usually from rNCA function
Usage
foreNCA(NCAres = "", PPTESTCD = "", PCTESTCD = "", title = "", ...)
Arguments
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 |
Details
This functio calls forestplot
in forest package.
Value
Currently, this just plots.
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Load EX and PC domain files in folders
Description
This loads and returns EX and PC domain files in the specified folders
Usage
loadEXPC(folders)
Arguments
folders |
folders where to find EX and PC domain files |
Details
This reads EX and PC domain files in the specified folder.
This calls readEX
and readPC
functions.
Value
EX |
combined EX domain data |
PC |
combined PC doamin data |
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
NCA output to pdf file
Description
This output NCA result in a pdf file.
Usage
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)
Arguments
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 |
Value
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 |
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Examples
#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")
Plot best fit slope
Description
Automatically select best fit slope for the given x(usually time) and log(y)(usually concentration) values.
Usage
plotFit(concData, id, Time, conc, mol = "", adm = "Extravascular", ID = "", Mol = "")
Arguments
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 |
Details
Find the best fit slope then plot it.
Currently this function uses ordinary least square method(OLS) only.
This function calles BestSlope
function.
Value
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 |
Author(s)
Jee Eun Lee <JeeEun.Lee@fda.hhs.gov>
See Also
Examples
plotFit(Theoph, "Subject", "Time", "conc", ID="1")
plotFit(Indometh, "Subject", "time", "conc", adm="Bolus", ID="1")
Plot concentration vs. time curve for individuals and collectively.
Description
Generates individual and superposed concentration vs. time curve and save it in pdf files.
Usage
plotPK(concData, id, Time, conc, unitTime = "hr", unitConc = "ng/mL", trt = "",
fit = "Linear", dose = 0, adm = "Extravascular", dur = 0, outdir = "Output")
Arguments
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 |
Details
This function generates plots for individual and summary concentration vs. time curve. This function calles NCA()
.
Value
This function saves pdf files and tiff files in the outdir
folder.
Author(s)
Jee Eun Lee <JeeEun.Lee@fda.hhs.gov>
See Also
Examples
# 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)
Do NCA for review
Description
This performs NCA from the CDISC EX and PC datasets.
Usage
rNCA(ex, pc, study = "", trt = "", id = "", analyte = "",
codeBQL = c("< 0", "<0", "NQ", "BLQ", "BQL", "BQoL", "<LOQ"),
fit="Linear", MinPoints = 5)
Arguments
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 |
Details
This calls NCA0. Results of this can be further processed by foreNCA to plot and compare between studies and dose groups.
Value
This returns a table of NCA results
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Read EX domain files
Description
This reads EX domain files from the specified folders.
Usage
readEX(folders)
Arguments
folders |
folders where to find EX doamin files |
Details
This calls combXPT
function.
This is called by loadEXPC
function.
Value
This returns combined table of EX doamin.
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Read PC domain files
Description
This reads PC domain files from the specified folders.
Usage
readPC(folders)
Arguments
folders |
folders where to find PC doamin files |
Details
This calls combXPT
function.
This is called by loadEXPC
function.
Value
This returns combined table of PC doamin.
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
NCA output to rtf file
Description
This output NCA result in a rtf file.
Usage
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)
Arguments
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 |
Value
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 |
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Examples
#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")
Simplest NCA
Description
This is the work-horse function for NCA.
Usage
sNCA(x, y, dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h",
concUnit = "ug/L", iAUC = "", down = "Linear", MW = 0, returnNA = TRUE)
Arguments
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 |
Details
This will replace IndiNCA
.
Value
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 |
Author(s)
Kyun-Seop Bae <k@acr.kr>
References
Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications. 5th ed. 2016.
See Also
Examples
# 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")
Table output NCA
Description
do multiple NCA and returns a result table.
Usage
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)
Arguments
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 |
Value
Basically same with sNCA
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Examples
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")
Text output of NCA for one subject
Description
This is the text form output.
Usage
txtNCA(x, y, dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h",
concUnit = "ug/L", iAUC = "", down="Linear", MW = 0, returnNA = FALSE)
Arguments
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 |
Value
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 |
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
Examples
# 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