radsub {random.cdisc.data}R Documentation

Subcategory Analysis Dataset (ADSUB)

Description

[Stable]

Function for generating a random Subcategory Analysis Dataset for a given Subject-Level Analysis Dataset.

Usage

radsub(
  adsl,
  param = c("Baseline Weight", "Baseline Height", "Baseline BMI", "Baseline ECOG",
    "Baseline Biomarker Mutation"),
  paramcd = c("BWGHTSI", "BHGHTSI", "BBMISI", "BECOG", "BBMRKR1"),
  seed = NULL,
  na_percentage = 0,
  na_vars = list(),
  cached = FALSE
)

Arguments

adsl

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

param

(⁠character vector⁠)
Parameter values.

paramcd

(⁠character vector⁠)
Parameter code values.

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 ADSUB data cadsub should be returned or new data should be generated. If set to TRUE then the other arguments to radsub will be ignored.

Details

One record per subject.

Keys: STUDYID, USUBJID, PARAMCD, AVISITN, ADTM, SRCSEQ

Value

data.frame

Author(s)

tomlinsj, npaszty, Xuefeng Hou, dipietrc

Examples

adsl <- radsl(N = 10, seed = 1, study_duration = 2)

adsub <- radsub(adsl, seed = 2)
adsub

[Package random.cdisc.data version 0.3.15 Index]