An R6 base class for designs requiring Complete Path Enumeration
An R6 base class for designs requiring Complete Path Enumeration
performance
A vector used for vetting performance
max_dose()
Cpe$max_dose(D)
D
A positive integer, the highest permissible dose.
Set or query upper limit on further dosing
Self (invisibly), unless D
is missing,
in which case the top dose, an integer, is returned.
bU()
Cpe$bU()
Get the b
vector and U
matrix
Named list with components b
and U
J()
Cpe$J()
Get the number J
of paths
Integer number of paths
applied()
Cpe$applied(x, o, last_dose, max_dose)
x
A dose-wise vector of toxicity counts
o
A dose-wise vector of non-toxicity counts
last_dose
The most recently given dose, as required to implement cumulative-cohort-based escalation decisions.
max_dose
An upper limit on future dose levels
Return dose recommendation for given tox/no-tox tallies.
An object with components:
$stop
- logical value indicating whether stop is indicated
$mtd
- integer value, the recommended dose
$max_dose
- integer value, a dose not to be exceeded henceforth.
report()
Cpe$report(...)
...
Optional columns to add to report
Hook for concrete subclasses to implement for performance reporting
from method Cpe$trace_paths
NULL
trace_paths()
Cpe$trace_paths(root_dose, cohort_sizes, ..., prog = NULL, unroll = 4)
root_dose
The starting dose for tree of paths
cohort_sizes
Integer vector giving sizes of future cohorts, its length being the maximum number of cohorts to look ahead.
...
Parameters passed ultimately to mclapply
, presently
an unexported, specially adapted version of parallel::mclapply
that implements progress reporting.
prog
A function of a single integer, the current cumulative path count, to be used for progress reporting
unroll
Integer; how deep to unroll path tree for parallelism
Compute trial paths forward from current tally
The computed paths are saved in a private field, from which variously formatted results may be obtained by accessor functions.
Self, invisibly
path_matrix()
Cpe$path_matrix()
Return computed trial paths in matrix form
An integer matrix with the same column layout as the DTP tables of dtpcrm. That is, there is a D0 column followed by paired Tc, Dc columns giving the toxicity count for cohort c and the resulting dose recommendation yielded by cohort c -- which is generally the recommendation for cohort c+1.
path_array()
Cpe$path_array(condense = TRUE)
condense
Logical value; if FALSE, the returned array has its
cohorts indexed trial-wise instead of dose-wise. This inflates the
array more than needed for the matrix computations it must support
(observe that in Norris2020c Eq. (4), the c
index is eliminated
already by summation), but enables the sequence of events along a path
to be read off directly if this is required e.g. for visualization or
debugging. Default is TRUE.
Return computed trial paths in a 3D array
For the j
th path, the C*D matrix T[j,,]
gives
the number of toxicities T[j,c,d]
occurring in the c
th
cohort for dose d. In case condense=FALSE
, see above.
path_probs()
Cpe$path_probs(probs.DLT)
probs.DLT
Numeric vector of DLT probabilities for the design's prespecified doses.
Path probabilities for given dose-wise DLT probabilities
The design's paths must already have been completely enumerated by
trace_paths
.
A vector of probabilities for the enumerated paths
path_rx()
Cpe$path_rx()
Vector of path-wise final dose recommendations
The design's paths must already have been completely enumerated by
trace_paths
. This method is a temporizing measure, bridging
to a new format for the return value of path_matrix
, possibly
a data.table
where the dose recs would be a column.
Integer vector of final dose recs on the enumerated paths
clone()
The objects of this class are cloneable with this method.
Cpe$clone(deep = FALSE)
deep
Whether to make a deep clone.
TODO: Lots to be said here! The fundamental CPE concept has to be stated, and implementation strategy discussed as well. If it turns out this class ends up providing hooks for cacheing, this also needs to be detailed.
Norris DC. What Were They Thinking? Pharmacologic priors implicit in a choice of 3+3 dose-escalation design. arXiv:2012.05301 [stat.ME]. December 2020. https://arxiv.org/abs/2012.05301
path_matrix
, path_table
, path_array
.
trace_paths
, which must already have been invoked
if this method is to return a meaningful result.
trace_paths
, which must already have been invoked
if this method is to return a result.