Description Usage Arguments Details Value Author(s) Examples
Function to derive a variable that classifies time points in relation to treatment, as pre-, on-, or post-therapy.
1 2 3 4 | pgx.trtreat(measure, exposure,
mtime, winlen,
estart = "exstdtR", eend = "exendtR",
subjid = "USUBJID")
|
measure |
A data frame containing a time series |
exposure |
A data frame containing therapy exposure records |
mtime |
Name of the variable in |
winlen |
Length of time beyond last exposure that is in on-therapy window |
estart |
Name of the variable in |
eend |
Name of the variable in |
subjid |
Name of the variable in |
This function derives the time in relation to treatment, from clinical trial data consisting of: (i) time series; and (ii) therapy exposure records.
HOW SHOULD WE HANDLE SUBJECTS WITH NO EXPOSURE RECORDS
A data frame of derived values for time in relation to treatment, which can be NA, “Pre-therapy”, “On-therapy”, or “Post-therapy”.
Toby Johnson Toby.x.Johnson@gsk.com
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(clinex) # like plain text export of SAS files from CDER/CDISC
# compliant data
## format dates for R
clinex$LAB <- within(clinex$LAB, {
lbdtR <- as.Date(LBDT, "%d%b%Y")
})
clinex$EXPOSURE <- within(clinex$EXPOSURE, {
exstdtR <- as.Date(EXSTDT, "%d%b%Y")
exendtR <- as.Date(EXENDT, "%d%b%Y")
})
table(pgx.trtreat(clinex$LAB, clinex$EXPOSURE,
mtime = "lbdtR", winlen = 0), useNA="always")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.