Learn R Programming

crmPack (version 2.0.0)

DataOrdinal-class: DataOrdinal

Description

[Experimental]

DataOrdinal is a class for ordinal toxicity data. It inherits from GeneralData and it describes toxicity responses on an ordinal rather than binary scale.

Usage

DataOrdinal(
  x = numeric(),
  y = integer(),
  ID = integer(),
  cohort = integer(),
  doseGrid = numeric(),
  placebo = FALSE,
  yCategories = c(`No DLT` = 0L, DLT = 1L),
  ...
)

.DefaultDataOrdinal()

Arguments

x

(numeric)
the doses for the patients.

y

(integer)
the vector of toxicity events (0 or 1). You can also supply numeric vectors, but these will then be converted to integer internally.

ID

(integer)
unique patient IDs. You can also supply numeric vectors, but these will then be converted to integer internally.

cohort

(integer)
the cohort (non-negative sorted) indices. You can also supply numeric vectors, but these will then be converted to integer internally.

doseGrid

(numeric)
all possible doses.

placebo

(flag)
if TRUE the first dose level in the doseGrid is considered as placebo.

yCategories

(named integer)
the names and codes for the toxicity categories used in the data. Category labels are taken from the names of the vector. The names of the vector must be unique and its values must be sorted and take the values 0, 1, 2, ...

...

not used.

Details

The cohort can be missing if and only if placebo is equal to FALSE.

Examples

Run this code
DataOrdinal(
  x = c(10, 20, 30, 40, 50, 50, 50, 60, 60, 60),
  y = as.integer(c(0, 0, 0, 0, 0, 1, 0, 0, 1, 2)),
  ID = 1L:10L,
  cohort = as.integer(c(1:4, 5, 5, 5, 6, 6, 6)),
  doseGrid = c(seq(from = 10, to = 100, by = 10)),
  yCategories = c("No tox" = 0L, "Sub-tox AE" = 1L, "DLT" = 2L),
  placebo = FALSE
)

Run the code above in your browser using DataLab