allocationPlot: Plot subject allocations

Description Usage Arguments Usage notes Examples

View source: R/functions.R

Description

Plot subject allocations

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
allocationPlot(
  subjectData,
  dose = Dose,
  tox = Toxicity,
  doseGrid,
  toxCategories = list(),
  toxData = NA,
  toxVar = NA,
  recommendedDose = NA
)

Arguments

subjectData

The tibble containing subject level dose allocations and toxicity status

dose

the name of the column in subjectData which defines the dose

tox

the name of the column in subjectData which defines the toxicity status.

doseGrid

the values to appear along the dose axis. Can be omitted: if so, only those values that exist in dose column of subjectData will be used.

toxCategories

a list containing the labels of the toxicity categories that will appear in the legend. Can be omitted. If omitted, sensible defaults are derived, based on the mighest value of tox in subjectData. Names of list elements should be "0" ... "<n>", values are used as labels in the legend.

toxData

the name of the tibble containing the poasterior estimates of toxicity. See Usage notes below.

toxVar

the name of the column in toxData containing p(Tox) [or other relevant statistic]. See Usage notes below

recommendedDose

Optional. The value of dose to mark as the recommended dose

Usage notes

toxData and toxVar must either both be omitted or both be present. The toxData tibble should contain columns named dose and toxVar. Other columns are ignored. It should contain one row for each value of dose in subjectData

Examples

1
2
3
4
5
6
7
#Basic usage
data("oQuigleyPatientData")
allocationPlot(oQuigleyPatientData, doseGrid=1:6)
#More advanced
data("oQuigleyPosteriorShort")
toxData <- oQuigleyPosteriorShort %>% tidy() %>% augmentOQuigleyData() %>% createDoseSummary()
allocationPlot(oQuigleyPatientData, doseGrid=1:6, toxData=toxData, toxVar=Mean, recommendedDose=2)

PuzzledFace/crmReporter documentation built on June 21, 2020, 12:52 a.m.