pkprofile | R Documentation |
This function generates concentration-time profiles from a linear pharmacokinetic (PK) system, possibly with first-order absorption or zero-order infusion, possibly with one or more peripheral compartments, and possibly under steady-state conditions. Single or multiple doses may be specified.
pkprofile(...) ## Default S3 method: pkprofile( t.obs = seq(0, 24, 0.1), cl = 1, vc = 5, q = numeric(0), vp = numeric(0), ka = 0, dose = list(t.dose = 0, amt = 1, rate = 0, dur = 0, ii = 24, addl = 0, ss = 0, cmt = 0, lag = 0, f = 1), sc = vc, initstate = NULL, ... ) ## S3 method for class 'matrix' pkprofile( A, t.obs = seq(0, 24, 0.1), dose = list(t.dose = 0, amt = 1, rate = 0, dur = 0, ii = 24, addl = 0, ss = 0, cmt = 0, lag = 0, f = 1), defdose = 1, sc = 1, initstate = NULL, ... )
... |
Further arguments passed along to other methods. |
t.obs |
A numeric vector of times at which to observe concentrations. |
cl |
Central clearance parameter. |
vc |
Central volume parameter. |
q |
Inter-compartmental clearance. Can be a vector for more than one
peripheral compartment, or empty for none. Must match |
vp |
Peripheral volume. Can be a vector for more than one
peripheral compartment, or empty for none. Must match |
ka |
First-order absorption rate parameter. Set to 0 to indicate that there is no first-order absorption (i.e. bolus or infusion). |
dose |
A
|
sc |
A scaling constant for the central compartment. Concentrations are obtained by dividing amounts by this constant. |
initstate |
A numeric vector containing values to initialize the compartments. |
A |
A matrix of first-order rate constants between the compartments. |
defdose |
The default dose compartment when the compartment is missing or 0. |
An object of class "pkprofile", which is simply a numeric vector of
concentration values with some attributes attached to it.
This object has its own methods for print
, plot
, lines
and points
.
pkprofile(default)
: Default method.
pkprofile(matrix)
: Matrix method.
Pay attention to the default arguments. They are there for convenience, but may lead to undesired results if one is not careful.
halflife
secondary
print.pkprofile
plot.pkprofile
lines.pkprofile
points.pkprofile
# Default values, a bolus injection y <- pkprofile() plot(y) t.obs <- seq(0, 24, 0.1) dur <- 1 amt <- 1 ka <- 1 cl <- 0.25 vc <- 5 q <- 2.5 vp <- 10 # One-compartment model with first-order absorption, single dose y <- pkprofile(t.obs, cl=cl, vc=vc, ka=ka, dose=list(amt=amt)) plot(y) # Two-compartment model with first-order absorption, single dose y <- pkprofile(t.obs, cl=cl, vc=vc, vp=vp, q=q, ka=ka, dose=list(amt=amt)) plot(y) # One-compartment model with zero-order infusion, single dose y <- pkprofile(t.obs, cl=cl, vc=vc, dose=list(dur=dur, amt=amt)) plot(y) # Two-compartment model with zero-order infusion, single dose y <- pkprofile(t.obs, cl=cl, vc=vc, vp=vp, q=q, dose=list(dur=dur, amt=amt)) plot(y) # Two-compartment model with bolus injection, single dose y <- pkprofile(t.obs, cl=cl, vc=vc, vp=vp, q=q, dose=list(amt=amt)) plot(y) # Two-compartment model with bolus injection into the peripheral compartment, single dose y <- pkprofile(t.obs, cl=cl, vc=vc, vp=vp, q=q, dose=list(amt=amt, cmt=2)) plot(y) # Two-compartment model with zero-order infusion into the peripheral compartment, single dose y <- pkprofile(t.obs, cl=cl, vc=vc, vp=vp, q=q, dose=list(amt=amt, cmt=2, dur=dur)) plot(y) t.obs <- seq(0, 24*6, 1) # One-compartment model with first-order absorption, multiple doses y <- pkprofile(t.obs, cl=cl, vc=vc, ka=ka, dose=list(t.dose=seq(0, 24*5, 12), amt=amt)) plot(y) # One-compartment model with first-order absorption, multiple doses specified by addl and ii y <- pkprofile(t.obs, cl=cl, vc=vc, ka=ka, dose=list(t.dose=0, amt=amt, addl=9, ii=12)) plot(y, type="b") points(y, col="blue") # One-compartment model with first-order absorption, multiple doses under steady-state conditions yss <- pkprofile(t.obs, cl=cl, vc=vc, ka=ka, dose=list(t.dose=0, amt=amt, addl=9, ii=12, ss=1)) lines(yss, col="red") points(yss, col="green") # One-compartment model with zero-order infusion, multiple doses specified by addl and ii y <- pkprofile(t.obs, cl=cl, vc=vc, dose=list(dur=dur, amt=amt, addl=9, ii=12)) plot(y, log="y") # One-compartment model with zero-order infusion, multiple doses under steady-state conditions yss <- pkprofile(t.obs, cl=cl, vc=vc, dose=list(dur=dur, amt=amt, addl=9, ii=12, ss=1)) lines(yss, col="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.