Skip to contents

[Stable]

Function for generating a random Anti-Drug Antibody Analysis Dataset for a given Subject-Level Analysis Dataset and Pharmacokinetics Analysis Dataset.

Usage

radab(
  adsl,
  adpc,
  constants = c(D = 100, ka = 0.8, ke = 1),
  paramcd = c("R1800000", "RESULT1", "R1800001", "RESULT2", "ADASTAT1", "INDUCD1",
    "ENHANC1", "TRUNAFF1", "EMERNEG1", "EMERPOS1", "PERSADA1", "TRANADA1", "BFLAG1",
    "TIMADA1", "ADADUR1", "ADASTAT2", "INDUCD2", "ENHANC2", "EMERNEG2", "EMERPOS2",
    "BFLAG2", "TRUNAFF2"),
  param = c("Antibody titer units", "ADA interpreted per sample result",
    "Neutralizing Antibody titer units", "NAB interpreted per sample result",
    "ADA Status of a patient", "Treatment induced ADA", "Treatment enhanced ADA",
    "Treatment unaffected", "Treatment Emergent - Negative",
    "Treatment Emergent - Positive", "Persistent ADA", "Transient ADA", "Baseline",
    "Time to onset of ADA", "ADA Duration", "NAB Status of a patient",
    "Treatment induced ADA, Neutralizing Antibody",
    "Treatment enhanced ADA, Neutralizing Antibody", 
    
    "Treatment Emergent - Negative, Neutralizing Antibody",
    "Treatment Emergent - Positive, Neutralizing Antibody",
    "Baseline, Neutralizing Antibody", "Treatment unaffected, Neutralizing Antibody"),
  avalu = c("titer", "", "titer", "", "", "", "", "", "", "", "", "", "", "weeks",
    "weeks", "", "", "", "", "", "", ""),
  seed = NULL,
  na_percentage = 0,
  na_vars = list(AVAL = c(NA, 0.1)),
  cached = FALSE
)

Arguments

adsl

(data.frame)
Subject-Level Analysis Dataset (ADSL).

adpc

(data.frame)
Pharmacokinetics Analysis Dataset.

constants

(character vector)
Constant parameters to be used in formulas for creating analysis values.

paramcd

(character vector)
Parameter code values.

param

(character vector)
Parameter values.

avalu

(character)
Analysis value units.

seed

(numeric)
Seed to use for reproducible random number generation.

na_percentage

(proportion)
Default percentage of values to be replaced by NA.

na_vars

(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 (numeric)
    The seed to be used for this element - can be NA.

  • percentage (proportion)
    Percentage of elements to be replaced with NA. If NA, na_percentage is used as a default.

cached

boolean whether the cached ADAB data cadab should be returned or new data should be generated. If set to TRUE then the other arguments to radab will be ignored.

Value

data.frame

Details

One record per study per subject per parameter per time point: "R1800000", "RESULT1", "R1800001", "RESULT2".

Examples

library(random.cdisc.data)
adsl <- radsl(N = 10, seed = 1, study_duration = 2)
adpc <- radpc(adsl, seed = 2, duration = 9 * 7)

adab <- radab(adsl, adpc, seed = 2)
adab
#> # A tibble: 208 × 21
#>    STUDYID USUBJID      ARM   ACTARM ISTPT  AVAL AVALC AVALU PARAM PARAMCD VISIT
#>    <chr>   <chr>        <fct> <fct>  <fct> <dbl> <chr> <fct> <fct> <fct>   <fct>
#>  1 AB12345 AB12345-JPN… A: D… A: Dr… Pred…  1.04 POSI… titer Anti… R18000… Day 1
#>  2 AB12345 AB12345-USA… A: D… A: Dr… Pred…  1.32 POSI… titer Anti… R18000… Day 1
#>  3 AB12345 AB12345-BRA… A: D… A: Dr… Pred… NA    NEGA… titer Anti… R18000… Day 1
#>  4 AB12345 AB12345-CHN… A: D… A: Dr… Pred… NA    NEGA… titer Anti… R18000… Day 1
#>  5 AB12345 AB12345-CHN… C: C… C: Co… Pred…  1.03 POSI… titer Anti… R18000… Day 1
#>  6 AB12345 AB12345-CHN… A: D… A: Dr… Pred…  1.14 POSI… titer Anti… R18000… Day 1
#>  7 AB12345 AB12345-RUS… A: D… A: Dr… Pred…  1.40 POSI… titer Anti… R18000… Day 1
#>  8 AB12345 AB12345-BRA… C: C… C: Co… Pred… NA    NEGA… titer Anti… R18000… Day 1
#>  9 AB12345 AB12345-JPN… A: D… A: Dr… 24H    1.20 POSI… titer Anti… R18000… Day 2
#> 10 AB12345 AB12345-USA… A: D… A: Dr… 24H   NA    NEGA… titer Anti… R18000… Day 2
#> # ℹ 198 more rows
#> # ℹ 10 more variables: VISITDY <int>, PARCAT1 <fct>, ADABLPFL <fct>,
#> #   ADPBLPFL <fct>, ABLFL <fct>, RELTMU <fct>, NFRLT <dbl>, AFRLT <dbl>,
#> #   NRRLT <dbl>, ARRLT <dbl>