| blk.isSteadyState | R Documentation |
This function will flag dose events that occur under steady-state conditions in a PK data set that contains all single dose events.
blk.isSteadyState(time, id, dose.ind, dose.interval, tol, min.time.ss, dose = NULL, diff.op = difftime.default)
time |
A vector of event times in |
id |
A valid |
dose.ind |
A logical vector in |
dose.interval |
The dosing interval. |
tol |
A tolerance for the actual length of the dosing intervals. See details. |
min.time.ss |
Steady-state is achieved when the same dose is taken at constant intervals for at least this amount of time. |
dose |
Vector of dose amounts in |
diff.op |
A function that subtracts one time from another. |
This function operates on a PK data set in block-format.
Event times are specified by time and rows that corresponding to dose events are
indicated by dose.ind.
A steady-state condition is achieved if the same dose is taken at constant
intervals for a sufficient length of time. The length of time required to
reach steady state will in general vary between compounds and between
individuals, but a rule of thumb is that the time should at minimum exceed 5 to 7
times the half-life of the compound. The time deemed necessary is
specified using min.time.ss. Pharmacokinetic analysis can be
simplified if it is known that certain dose events occur under steady-state
conditions.
For steady state, doses must be given at constant intervals. The dosing
interval is specified by dose.interval. The actual times between
doses may vary, however. Using the argument tol a tolerance can be
specified. If the actual time interval between two consecutive doses is
within tol of dose.interval, then these doses can be part of
a repeated-dose sequence that leads to steady-state conditions.
A logical vector in block-format with respect to id
indicating dose events occurring at steady state according to the criteria
specified.
Benjamin Rich <mail@benjaminrich.net>
block-format
blk.intereventTime
blk.noninformativeDose
difftime.default
require(nlme)
data(Phenobarb)
dat <- Phenobarb[1:56,] # First 4 subjects
attach(dat)
cbind(dat, INTERDOSE.TIME=blk.intereventTime(time, asID(Subject), !is.na(dose)),
IS.SS=blk.isSteadyState(time, asID(Subject), !is.na(dose), 12, 0.301, 60, dose),
FLAG=blk.noninformativeDose(asID(Subject), !is.na(dose), blk.isSteadyState(time, asID(Subject), !is.na(dose), 12, 0.301, 60, dose)))
detach(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.