Learn R Programming

crmPack (version 2.0.0)

Data-class: Data

Description

[Stable]

Data is a class for the data input. It inherits from GeneralData.

Usage

Data(
  x = numeric(),
  y = integer(),
  ID = integer(),
  cohort = integer(),
  doseGrid = numeric(),
  placebo = FALSE,
  ...
)

.DefaultData()

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.

...

not used.

Slots

x

(numeric)
the doses for the patients.

y

(integer)
the vector of toxicity events (0 or 1 integers).

doseGrid

(numeric)
the vector of all possible doses (sorted), i.e. the dose grid.

nGrid

(integer)
number of gridpoints.

xLevel

(integer)
the levels for the doses the patients have been given, w.r.t doseGrid.

placebo

(logical)
if TRUE the first dose level in the doseGridis considered as PLACEBO.

Details

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

Examples

Run this code
my_data <- Data(
  x = c(0.1, 0.5, 1.5, 3, 6, 10, 10, 10),
  y = c(0, 0, 0, 0, 0, 0, 1, 0),
  ID = as.integer(1:8),
  cohort = as.integer(c(1, 2, 3, 4, 5, 6, 6, 6)),
  doseGrid = c(
    0.1,
    0.5,
    1.5,
    3,
    6,
    seq(from = 10, to = 80, by = 2)
  )
)
my_data

Run the code above in your browser using DataLab