blk.isSteadyState: Flag Dose Events Occuring Under Steady-State Conditions

View source: R/PCSmisc.R

blk.isSteadyStateR Documentation

Flag Dose Events Occuring Under Steady-State Conditions

Description

This function will flag dose events that occur under steady-state conditions in a PK data set that contains all single dose events.

Usage

blk.isSteadyState(time, id, dose.ind, dose.interval, tol, min.time.ss, dose = NULL, diff.op = difftime.default)

Arguments

time

A vector of event times in block-format with respect to id.

id

A valid block-format ID.

dose.ind

A logical vector in block-format with respect to id. Indicates rows corresponding to dose events.

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 block-format with respect to id. If it is NULL (the default), then assume that all doses are the same.

diff.op

A function that subtracts one time from another.

Details

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.

Value

A logical vector in block-format with respect to id indicating dose events occurring at steady state according to the criteria specified.

Author(s)

Benjamin Rich <mail@benjaminrich.net>

See Also

  • block-format

  • blk.intereventTime

  • blk.noninformativeDose

  • difftime.default

Examples

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)


benjaminrich/PCSmisc documentation built on Feb. 11, 2024, 9:25 p.m.