Event translation for rxode2
Usage
etTrans(
inData,
obj,
addCmt = FALSE,
dropUnits = FALSE,
allTimeVar = FALSE,
keepDosingOnly = FALSE,
combineDvid = NULL,
keep = character(0),
addlKeepsCov = FALSE,
addlDropSs = TRUE,
ssAtDoseTime = TRUE,
iCov = NULL,
tieOrder = c("evid", "data"),
resetCancelsPending = TRUE,
checkModeledRateDur = TRUE,
addlDropPastObs = FALSE
)
etTrans(
inData,
obj,
addCmt = FALSE,
dropUnits = FALSE,
allTimeVar = FALSE,
keepDosingOnly = FALSE,
combineDvid = NULL,
keep = character(0),
addlKeepsCov = FALSE,
addlDropSs = TRUE,
ssAtDoseTime = TRUE,
iCov = NULL,
tieOrder = c("evid", "data"),
resetCancelsPending = TRUE,
checkModeledRateDur = TRUE,
addlDropPastObs = FALSE
)Arguments
- inData
Data frame to translate
- obj
object where model variables can be extracted from
- addCmt
Add compartment to data frame (default
FALSE).- dropUnits
Boolean to drop the units (default
FALSE).- allTimeVar
Treat all covariates as if they were time-varying
- keepDosingOnly
keep the individuals who only have dosing records and any trailing dosing records after the last observation.
- combineDvid
is a boolean indicating if rxode2 will use
DVIDon observation records to change thecmtvalue; Useful for multiple-endpoint nlmixr models. By default this is determined byoption("rxode2.combine.dvid")and if the option has not been set, this isTRUE. This typically does not affect rxode2 simulations.- keep
This is a named vector of items you want to keep in the final rxode2 dataset. For added rxode2 event records (if seen), last observation carried forward will be used.
- addlKeepsCov
This determines if the additional dosing items repeats the dose only (
FALSE) or keeps the covariates at the record of the dose (TRUE)- addlDropSs
When there are steady state doses with an
addlspecification the steady state flag is dropped with repeated doses (whenTRUE) or retained (whenFALSE)- ssAtDoseTime
Boolean that when
TRUEback calculates the steady concentration at the actual time of dose, otherwise whenFALSEthe doses are shifted- iCov
A data frame of individual non-time varying covariates to combine with the
eventsdataset. TheiCovdataset has one covariate per ID and should match the event table- tieOrder
How records that share a subject and time are ordered:
"evid"(the default) puts resets first, then doses, then observations;"data"keeps the order of the rows ininData, the way NONMEM processes its records. Records a row expands to (the reset of anevid=4dose,addlrepeats, infusion ends) follow that row.- resetCancelsPending
When
TRUE(default), theaddlrepeats of a record that a later reset (evid3 or 4) is processed after are dropped from that reset's time on, as NONMEM cancels prior doses at a reset.- checkModeledRateDur
When
TRUE(default), warn when a bolus dose goes into a compartment with a modeledrate()/dur()(datarateis not-1/-2), or a dose requests a modeled rate/duration the model does not define.- addlDropPastObs
When
TRUE, theaddlrepeats of a subject with observations stop after the first one past the subject's last record, as later ones cannot change any record before it. Doses into analag()compartment, subjects whose time moves back and models with model times (mtime()),evid_()pushes,lead(),last()or a negativelag()keep every repeat. DefaultFALSE.
