Description Details Methods Note See Also Examples
An R6 base class for hyperpriors over MTDi distributions
An R6 base class for hyperpriors over MTDi distributions
With CPE liberating precautionary from the need for nested simulations,
the opportunity arises for a more encapsulated treatment of MTDi scenario
generators ('hyperpriors') and their sampling. Specifically, individual
sampled scenarios need only yield two functions:
A CDF taking a dose vector
X = (X_1,...,X_d)
to probabilities
p = (p_1,...,p_d)
A function F(X,kappa) yielding a fractionation matrix $F = [0 G; H 0]$. Crucially, this class actually represents an APPROXIMATION to the hyperprior, via a finite set of samples from it. The use of reference classes enables us to improve this approximation efficiently by in-place updating.
new()HyperMTDi_lognormal$new(CV, median_mtd, median_sdlog, units, n = 100)
CVCoefficient of variation of median MTDi
median_mtdMedian MTDi in the population
median_sdlogUncertainty in median MTDi, on log scale
unitsA short string specifying dose units
nNumber of samples to draw
Create a new HyperMTDi object.
A HyperMTDi object.
resample()HyperMTDi_lognormal$resample(n)
nNumber of samples to draw
Draw fresh samples
Self, invisibly
nsamples()HyperMTDi_lognormal$nsamples()
Get number of samples TODO: Consider a higher-level interface to progress-bar info
Number of samples drawn so far
extend()HyperMTDi_lognormal$extend(n = 1)
nNumber of additional MTDi scenarios to sample
Extend the samples, typically improving the approximation TODO: Investigate how much variance reduction QRNG yields.
Self, invisibly
doses()HyperMTDi_lognormal$doses(x)
xA vector of dose levels
Set or query the vector of prespecified dose levels
Self (invisibly), unless x is missing,
in which case the dose vector is returned.
skeleton()HyperMTDi_lognormal$skeleton(p)
pA vector of probabilities, one for each prespecified dose
Set or query a 'skeleton' probability vector
Self (invisibly), unless p is missing, in which case the
skeleton probabilities are returned (after being calculated from the
sample if not already set explicitly).
apply()HyperMTDi_lognormal$apply(f, ...)
fA closure that realizes a distribution-type function (such as a quantile function or CDF) when evaluated in the environment defined by any row of the sampled parameters.
...Arguments upon which to evaluate the enclosed function
Apply a distribution-type function over the sampled realizations TODO: Consider taking this method private.
A list of values of f
avg_tox_probs()HyperMTDi_lognormal$avg_tox_probs()
Get average toxicity probabilities over the sample
Toxicity probabilities at fixed doses, averaged over sample
fractionate()HyperMTDi_lognormal$fractionate(cpe, kappa)
cpeAn object of class Cpe
kappaA log-therapeutic index as in Eq (5) of Norris2020c
Return expected counts of ordinal toxicities
An nsamples-by-6 matrix, each row being the expected counts
for toxicity grades 0 through 5, at one sampled scenario.
plot()HyperMTDi_lognormal$plot(col = "gray", xlim = NULL, ...)
colColor of lines used to depict samples
xlimMay be used to override the default dose-axis limits, which span the 1% to 99% quantiles of all samples.
...Additional arguments passed onward to plot
Visualize the samples of a HyperMTDi object
if (interactive()) {
mtdi_gen <- HyperMTDi_lognormal$new(CV = 1
,median_mtd = 5
,median_sdlog = 0.5
,units="mg/kg")
mtdi_gen$plot()
}
clone()The objects of this class are cloneable with this method.
HyperMTDi_lognormal$clone(deep = FALSE)
deepWhether to make a deep clone.
This class implements a finite approximation to the infinite set of MTDi scenarios which it describes—an approximation which may be improved dynamically by expanding the samples.
Documentation for Cpe-class
1 2 3 4 5 6 7 8 9 10 11 | ## ------------------------------------------------
## Method `HyperMTDi_lognormal$plot`
## ------------------------------------------------
if (interactive()) {
mtdi_gen <- HyperMTDi_lognormal$new(CV = 1
,median_mtd = 5
,median_sdlog = 0.5
,units="mg/kg")
mtdi_gen$plot()
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.