vachette_data {vachette} | R Documentation |
Initialize vachette object with required data
Description
Initialize vachette object with required data
Usage
vachette_data(
obs.data,
typ.data,
sim.data = NULL,
covariates,
ref.dosenr,
log.x = FALSE,
iiv.correction = FALSE,
error.model = c("proportional", "additive"),
model.name = NULL,
mappings = NULL
)
Arguments
obs.data |
data.frame; Observed data |
typ.data |
data.frame; Typical (population) curves |
sim.data |
data.frame; Simulated (VPC) data |
covariates |
named character vector; Covariate names with reference values in vachette transformation |
ref.dosenr |
integer; Dose number to use as the reference dose, corresponding to value in "dosenr" column in input data |
log.x |
logical; Apply log(x) conversion. Default |
iiv.correction |
logical; Apply inter-individual variability correction. Default |
error.model |
character; Applied error model, |
model.name |
character; Optional model name for plot output |
mappings |
named character vector; Optional mappings to be included if column names in input |
Details
If "dosenr" column is missing it will be automatically calculated using the priority of available columns:
"EVID": If available in data, "dosenr" will be calculated using
cumsum(EVID==1)
"ADDL"/"II": If "ADDL" and "II" are available in data, "dosenr" will be calculated given additional dose number and interval
"AMT": If only "AMT" column exists in data, "dosenr" will be calculated using
cumsum(AMT!=0)
Value
vachette_data
Required columns obs.data
-
"ID"
- Subject ID -
"x"
- Typically time -
"PRED"
- Population prediction, required ifiiv.correction = TRUE
-
"IPRED"
- Individual prediction, required ifiiv.correction = TRUE
-
"OBS"
- DV -
"dosenr"
- Dose number; unique dose number for ID/time point
Required columns typ.data
-
"ID"
- Subject ID -
"x"
- Typically time -
"PRED"
- Population prediction -
"dosenr"
- Dose number; unique dose number for ID/time point
Required columns sim.data
-
"ID"
- Subject ID -
"x"
- Typically time -
"PRED"
- Population prediction, required ifiiv.correction = TRUE
-
"IPRED"
- Individual prediction, required ifiiv.correction = TRUE
-
"REP"
- Replicate number
Examples
obs <- read.csv(system.file(package = "vachette", "examples", "iv-obs.csv"))
typ <- read.csv(system.file(package = "vachette", "examples", "iv-typ-minmax.csv"))
vd <- vachette_data(
obs.data = obs,
typ.data = typ,
covariates = c(WT = 70),
mappings = c(OBS = "DV", x = "time"),
model.name = "IV"
)