tad | R Documentation |
Calculate time since most recent dose. Considers ADDL, but may not work with simultaneous dose records.
tad(
x,
dose = rep(FALSE, length(x)),
addl = rep(0, length(x)),
ii = rep(0, length(x)),
index = rep(1, length(x)),
pre = TRUE,
...
)
x |
a numeric vector of event times |
dose |
length x logical indicating which of x are dose times |
addl |
length x integer: number of additional doses |
ii |
length x numeric: interdose interval for addl |
index |
length x factor (optional) indicating subgroups to evaluate |
pre |
assume that simultaneous sample precedes implied dose |
... |
passed to tod() |
numeric
tod
Other tad:
tod()
data(tad1)
x <- tad1
head(x)
x$tad <- tad(
x = x$TIME,
dose = x$EVID %in% c(1,4) & is.na(x$C),
addl = x$ADDL,
ii = x$II,
index = x$ID
)
head(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.