secondary: Derive secondary PK parameters.

View source: R/linpk.R

secondaryR Documentation

Derive secondary PK parameters.

Description

Derive secondary PK parameters.

Usage

secondary(x, From = NULL, To = NULL, include.dose.times = T)

Arguments

x

A object of class pkprofile.

From

A vector of interval start times. The defaults is the times of the doses.

To

A vector of interval end times. The defaults is the time of the next dose, or last observation time.

include.dose.times

Should dose times (and end of infusion times) be considered in addition to the simulation times?

Value

A data.frame with one row for each time interval and with the following columns:

From

The time of the start of the interval. Can differ from the specified start time because it always corresponds to an actual data point.

To

The time of the end of the interval. Can differ from the specified end time because it always corresponds to an actual data point.

N

The number of distinct data points in the interval used to derive AUC, Cmax, etc.

Ctrough

Concentration at the time of dose (i.e. just prior to the dose). Only present if the start of the interval corresponds to a dose time.

Cmin

Minimum concentration over the interval.

Tmin

Time of the minimum concentration over the interval.

Cmax

Maximum concentration over the interval.

Tmax

Time of the maximum concentration over the interval.

Cave

Average concentration over the interval (calculated by the trapezoid rule).

AUC

Area under the concentration-time curve over the interval (calculated by the trapezoid rule).

Examples

t.obs <- seq(0, 24*4, 0.1)
y <- pkprofile(t.obs, cl=0.25, vc=5, ka=1, dose=list(t.dose=0, amt=1, addl=6, ii=12))
secondary(y)
secondary(y, 0, 48)
secondary(y, 0, Inf)
sum(secondary(y)$AUC)  # Same as above
plot(y)
with(secondary(y), points(Tmax, Cmax, pch=19, col="blue"))
with(secondary(y), points(Tmin, Cmin, pch=19, col="red"))
with(secondary(y), points(From, Ctrough, pch=19, col="green"))
with(secondary(y), points(From + 6, Cave, pch=19, col="purple", cex=2))


benjaminrich/linpk documentation built on April 18, 2024, 2:13 a.m.