Non Compart Manual

User Manual: Pdf

Open the PDF directly: View PDF PDF.
Page Count: 16

Package ‘NonCompart’
August 16, 2017
Version 0.3.3
Date 2017-08-16 KST
Title Noncompartmental Analysis for Pharmacokinetic Data
Description Conduct a noncompartmental analysis as closely as possible to the most widely used com-
mercial software for pharmacokinetic analysis, i.e. 'Phoenix(R) WinNon-
lin(R)' <https://www.certara.com/software/pkpd-modeling-and-simulation/phoenix-winnonlin/>.
Some features are
1) Use of 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)
Author Kyun-Seop Bae [aut]
Maintainer Kyun-Seop Bae <k@acr.kr>
Copyright 2016-2017, Kyun-Seop Bae
License GPL-3
NeedsCompilation no
LazyLoad yes
Repository CRAN
URL https://cran.r-project.org/package=NonCompart
Rtopics documented:
NonCompart-package.................................... 2
AUC............................................. 3
BestSlope .......................................... 4
IntAUC ........................................... 5
Interpol ........................................... 6
LinAUC........................................... 7
LogAUC........................................... 8
Slope ............................................ 9
sNCA ............................................ 10
tblNCA ........................................... 12
Unit ............................................. 13
UnitUrine .......................................... 14
1
2NonCompart-package
Index 16
NonCompart-package Noncompartmental Analysis for Pharmacokinetic Data
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
tblNCA to perform NCA for many subjects.
sNCA to perform NCA for one subject.
Author(s)
Kyun-Seop Bae <k@acr.kr>
References
1. Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts
and Applications. 5th ed. 2016.
2. Shargel L, Yu A. Applied Biopharmaceutics and Pharmacokinetics. 7th ed. 2015.
3. Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and
Applications. 4th ed. 2011.
4. 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
tblNCA(Theoph, key="Subject", colTime="Time", colConc="conc", dose=320,
adm="Extravascular", doseUnit="mg", concUnit="mg/L")
tblNCA(Indometh, key="Subject", colTime="time", colConc="conc", dose=25,
adm="Infusion", dur=0.5, doseUnit="mg", concUnit="mg/L")
# For individual NCA
iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24)) ; iAUC
x = Theoph[Theoph$Subject=="1","Time"]
y = Theoph[Theoph$Subject=="1","conc"]
sNCA(x, y, dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h", iAUC=iAUC)
sNCA(x, y, dose=320, concUnit="mg/L", iAUC=iAUC)
AUC 3
AUC Calculate Area Under the Curve (AUC) and Area Under the first Mo-
ment 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
xvector values of independent variable, usually time
yvector values of dependent variable, usually concentration
down either of "Linear" or "Log" to indicate the way to calculate AUC and AUMC
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 Appli-
cations. 4th ed. pp687-689. 2011.
See Also
LinAUC,LogAUC
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")
4BestSlope
BestSlope 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
xvector values of x-axis, usually time
yvector values of y-axis, usually concentration
adm one of "Bolus" or "Infusion" or "Extravascular" to indicate drug adminis-
tration mode
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 chal-
lenging, 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
Slope
IntAUC 5
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")
IntAUC Calculate interval AUC
Description
It calculates interval AUC
Usage
IntAUC(x, y, t1, t2, Res, down = "Linear")
Arguments
xvector values of independent variable, usually time
yvector values of dependent variable, usually concentration
t1 start time for AUC
t2 end time for AUC
Res result from IndiNCA function
down either of "Linear" or "Log" to indicate the way to calculate AUC
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
1. Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts
and Applications. 5th ed. 2016.
2. Shargel L, Yu A. Applied Biopharmaceutics and Pharmacokinetics. 7th ed. 2015.
3. Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and
Applications. 4th ed. 2011.
4. Gibaldi M, Perrier D. Pharmacokinetics. 2nd ed. revised and expanded. 1982.
See Also
AUC,Interpol
6Interpol
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)
Interpol 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
xvector values of x-axis, usually time
yvector 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 "Linear" or "Log" to indicate the way to interpolate
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
IntAUC
Examples
x = 10:1 + 0.1
y = -2*x + 40.2
Interpol(x, y, 1.5)
Interpol(x, y, 1.5, down="Log")
LinAUC 7
LinAUC 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
xvector values of independent variable, usually time
yvector 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
1. Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts
and Applications. 5th ed. 2016.
2. Shargel L, Yu A. Applied Biopharmaceutics and Pharmacokinetics. 7th ed. 2015.
3. Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and
Applications. 4th ed. 2011.
4. Gibaldi M, Perrier D. Pharmacokinetics. 2nd ed. revised and expanded. 1982.
See Also
LogAUC,AUC
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
8LogAUC
LogAUC 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
xvector values of independent variable, usually time
yvector 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
1. Gabrielsson J, Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts
and Applications. 5th ed. 2016.
2. Shargel L, Yu A. Applied Biopharmaceutics and Pharmacokinetics. 7th ed. 2015.
3. Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics - Concepts and
Applications. 4th ed. 2011.
4. Gibaldi M, Perrier D. Pharmacokinetics. 2nd ed. revised and expanded. 1982.
See Also
LinAUC,AUC
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")
Slope 9
Slope 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
xvector values of independent variable, usually time
yvector 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
BestSlope
Examples
Slope(Indometh[Indometh$Subject==1, "time"], Indometh[Indometh$Subject==1, "conc"])
10 sNCA
sNCA 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)
Arguments
xusually time
yusually concentration
dose given amount
adm one of "Bolus" or "Infusion" or "Extravascular" to indicate drug adminis-
tration mode
dur duration of infusion
doseUnit unit of dose
timeUnit unit of time
concUnit unit of concentration
iAUC interval AUCs to calculate
down either of "Linear" or "Log" to indicate the way to calculate AUC and AUMC
MW molecular weight of the drug
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
sNCA 11
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 administra-
tion
MRTIVIFP mean residence time (MRT) infinity using CLSTP, for intravascular administra-
tion
MRTEVLST mean residence time (MRT) to TLST, for extravascular administration
MRTEVIFO mean residence time (MRT) infinity using CLST, for extravascular administra-
tion
MRTEVIFP mean residence time (MRT) infinity using CLSTP, for extravascular administra-
tion
VZO volume of distribution determined by LAMZ and AUCIFO, for intravascular
administration
VZP volume of distribution determined by LAMZ and AUCIFP, for intravascular ad-
ministration
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 administra-
tion only
VSSP volume of distribution at steady state using CLSTP, for intravascular adminis-
tration only
12 tblNCA
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
help,tblNCA
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")
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)
sNCA(x, y/MW, doseUnit="mmol", concUnit="mmol/L", timeUnit="h", MW=MW)
sNCA(x, y/MW, dose=as.numeric(NA), doseUnit="mmol", concUnit="mmol/L", timeUnit="h",
MW=MW)
sNCA(x, y, dose=320, concUnit="mg/L", timeUnit="hr")
sNCA(x*60, y, dose=320, concUnit="mg/L", timeUnit="min")
tblNCA 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)
Unit 13
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 "Bolus" or "Infusion" or "Extravascular" to indicate drug adminis-
tration mode
dur duration of infusion
doseUnit unit of dose
timeUnit unit of time
concUnit unit of concentration
down method to calculate AUC, "Linear" or "Log"
MW molecular weight of drug
Value
Basically same with sNCA
Author(s)
Kyun-Seop Bae <k@acr.kr>
See Also
help,sNCA
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")
Unit 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)
14 UnitUrine
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")
UnitUrine Retuns a conversion factor for the amount calculation from urine con-
centration and volume
Description
You can get a conversion factor for the mulplication: conc * vol * factor = amount in the given unit.
Usage
UnitUrine(conU = "ng/mL", volU = "mL", amtU = "mg", MW = 0)
UnitUrine 15
Arguments
conU concentration unit
volU volume unit
amtU amount unit
MW molecular weight
Value
Factor conversion factor for multiplication with the unit in name
Author(s)
Kyun-Seop Bae <k@acr.kr>
Examples
UnitUrine()
UnitUrine("ng/mL", "mL", "mg")
UnitUrine("ug/L", "mL", "mg")
UnitUrine("ug/L", "L", "mg")
UnitUrine("ng/mL", "mL", "g")
UnitUrine("ng/mL", "mL", "mol", MW=500)
UnitUrine("ng/mL", "mL", "mmol", MW=500)
UnitUrine("ng/mL", "mL", "umol", MW=500)
Index
Topic AUC
AUC,3
IntAUC,5
LinAUC,7
LogAUC,8
Topic NCA
NonCompart-package,2
Topic Output Form
sNCA,10
tblNCA,12
Topic Slope
BestSlope,4
Topic interpolation
Interpol,6
Topic interval AUC
IntAUC,5
Interpol,6
Topic package
NonCompart-package,2
Topic partial AUC
IntAUC,5
Interpol,6
Topic slope
Slope,9
AUC,3,5,7,8
BestSlope,4,9
help,12,13
IntAUC,5,6
Interpol,5,6
LinAUC,3,7,8
LogAUC,3,7,8
NonCompart (NonCompart-package),2
NonCompart-package,2
Slope,4,9
sNCA,10,13
tblNCA,12,12
Unit,13
UnitUrine,14
16

Navigation menu