The modified toxicity probability interval 2 (mTPI-2) is a dose-escalation design by Guo et al. As the name suggests, it is an adaptation of the mTPI design.

```
get_mtpi2(
parent_selector_factory = NULL,
num_doses,
target,
epsilon1,
epsilon2,
exclusion_certainty,
alpha = 1,
beta = 1,
...
)
```

- parent_selector_factory
Object of type

`selector_factory`

.- num_doses
Number of doses under investigation.

- target
We seek a dose with this probability of toxicity.

- epsilon1
This parameter determines the lower bound of the equivalence interval. See Details.

- epsilon2
This parameter determines the upper bound of the equivalence interval. See Details.

- exclusion_certainty
Numeric, threshold posterior certainty required to exclude a dose for being excessively toxic. The authors discuss values in the range 0.7 - 0.95. Set to a value > 1 to suppress the dose exclusion mechanism. The authors use the Greek letter xi for this parameter.

- alpha
First shape parameter of the beta prior distribution on the probability of toxicity.

- beta
Second shape parameter of the beta prior distribution on the probability of toxicity.

- ...
Extra args are passed onwards.

an object of type `selector_factory`

that can fit the
mTPI-2 model to outcomes.

The design seeks a dose with probability of toxicity \(p_{i}\) close to a target probability \(p_{T}\) by iteratively calculating the interval $$p_{T} - \epsilon_{1} < p_{i} < p_{T} + \epsilon_{2}$$ In this model, \(\epsilon_{1}\) and \(\epsilon_{2}\) are specified constants. \(p_{i}\) is estimated by a Bayesian beta-binomial conjugate model $$p_{i} | data \sim Beta(\alpha + x_{1}, \beta + n_{i} - x_{i}),$$ where \(x_{i}\) is the number of toxicities observed and \(n_{i}\) is the number of patients treated at dose \(i\), and \(\alpha\) and \(\beta\) are hyperparameters for the beta prior on \(p_{i}\). A dose is excluded as inadmissible if $$P(p_{i} > p_{T} | data) > \xi$$ The trial commences at a starting dose, possibly dose 1. If dose \(i\) has just been evaluated in patient(s), dose selection decisions proceed by calculating the unit probability mass of the true toxicity rate at dose \(i\) using the partition of the probability space into subintervals with equal length given by\((\epsilon_{1} + \epsilon_{2})\). \(EI\) is the equivalence interval \(p_{T} - epsilon_{1}, p_{T} - epsilon_{2}\), with \(LI\) the set of all intervals below, and \(HI\) the set of all intervals above. The unit probability mass (UPM) of an interval is the posterior probability that the true toxicity rate belongs to the interval divided by the width of the interval. The interval with maximal UPM determines the recommendation for the next patient(s), with the intervals corresponding to decisions to escalate, stay, and de-escalate dose, respectively. Further to this are rules that prevent escalation to an inadmissible dose. In the original mTPI paper, the authors demonstrate acceptable operating performance using \(\alpha = \beta = 1\), \(K_{1} = 1\), \(K_{2} = 1.5\) and \(\xi = 0.95\). The authors of the mTPI-2 approach show desirable performance as compared to the original mTPI method, under particular parameter choices. See the publications for full details.

Ji, Y., Liu, P., Li, Y., & Bekele, B. N. (2010). A modified toxicity probability interval method for dose-finding trials. Clinical Trials, 7(6), 653–663. https://doi.org/10.1177/1740774510382799

Ji, Y., & Yang, S. (2017). On the Interval-Based Dose-Finding Designs, 1–26. Retrieved from https://arxiv.org/abs/1706.03277

Guo, W., Wang, SJ., Yang, S., Lynn, H., Ji, Y. (2017). A Bayesian Interval Dose-Finding Design Addressing Ockham's Razor: mTPI-2. https://doi.org/10.1016/j.cct.2017.04.006

```
target <- 0.25
model1 <- get_mtpi2(num_doses = 5, target = target, epsilon1 = 0.05,
epsilon2 = 0.05, exclusion_certainty = 0.95)
outcomes <- '1NNN 2NTN'
model1 %>% fit(outcomes) %>% recommended_dose()
#> [1] 1
```