radex.Rd
Function for generating random Exposure Analysis Dataset for a given Subject-Level Analysis Dataset.
radex(
ADSL,
param = c("Dose administered during constant dosing interval",
"Number of doses administered during constant dosing interval",
"Total dose administered", "Total number of doses administered"),
paramcd = c("DOSE", "NDOSE", "TDOSE", "TNDOSE"),
paramu = c("mg", " ", "mg", " "),
parcat1 = c("INDIVIDUAL", "OVERALL"),
parcat2 = c("Drug A", "Drug B"),
visit_format = "WEEK",
n_assessments = 5L,
n_days = 5L,
max_n_exs = 6L,
lookup = NULL,
seed = NULL,
na_percentage = 0,
na_vars = list(AVAL = c(NA, 0.1), AVALU = c(NA), 0.1),
cached = FALSE
)
Subject-Level Analysis Dataset (ADSL).
As character string. list of parameter values.
As character string. list of parameter code values.
As character vector of parameter unit value
Individual/Overall dose amount
Type of drug received Drug A / Drug B
Type of visit either "WEEK" or "CYCLE".
Number of weeks or cycles.
Number of days within cycle.
As numeric. maximum number of exposures
control lookup process
Seed for random number generation.
(numeric
) Default percentage of values to be replaced by NA
(list
) A named list where the name of each element is a column name of ds
. Each
element of this list should be a numeric vector with two elements
seed The seed to be used for this element - can be left NA
percentage How many element should be replaced. 0 is 0 % 1 is 100 %, can be left NA and default percentage is used. This will overwrite default percentage (percentage argument))
boolean whether the cached ADEX data cadex
should be returned or new data
should be generated. If set to TRUE
then the other arguments to radex
will be ignored.
data.frame
One record per each record in the corresponding SDTM domain.
Keys: STUDYID USUBJID EXSEQ PARAMCD PARCAT1 ASTDTM AVISITN
library(random.cdisc.data)
library(dplyr)
#>
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
ADSL <- radsl(N = 10, study_duration = 2, seed = 1)
ADEX <- radex(ADSL, seed = 2)