Package 'visit'

Title: Vaccine Phase I Design with Simultaneous Evaluation of Immunogenicity and Toxicity
Description: Phase I clinical trials are the first step in drug development to test a new drug or drug combination on humans. Typical designs of Phase I trials use toxicity as the primary endpoint and aim to find the maximum tolerable dosage. However, these designs are poorly applicable for the development of cancer therapeutic vaccines because the expected safety concerns for these vaccines are not as much as cytotoxic agents. The primary objectives of a cancer therapeutic vaccine phase I trial thus often include determining whether the vaccine shows biologic activity and the minimum dose necessary to achieve a full immune or even clinical response. This package implements a Bayesian Phase I cancer vaccine trial design that allows simultaneous evaluation of safety and immunogenicity outcomes. See Wang et al. (2019) <DOI:10.1002/sim.8021> for further details.
Authors: Zilu Wang [aut, cre] Chenguang Wang [aut, cre] Gary L Rosner [aut] Richard BS Roden [aut] Trustees of Columbia University [cph] (tools/make_cpp.R, R/stanmodels.R)
Maintainer: Chenguang Wang <[email protected]>
License: GPL (>= 3)
Version: 2.2
Built: 2024-12-25 07:02:01 UTC
Source: CRAN

Help Index


cancer Vaccine phase I design with Simultaneous evaluation of Immunogenecity and Toxicity

Description

This package contains the functions for implementing the visit design for Phase I cancer vaccine trials.

Background

Phase I clinical trials are the first step in drug development to apply a new drug or drug combination on humans. Typical designs of Phase I trials use toxicity as the primary endpoint and aim to find the maximum tolerable dosage. However, these designs are generally inapplicable for the development of cancer vaccines because the primary objectives of a cancer vaccine Phase I trial often include determining whether the vaccine shows biologic activity.

The visit design allows dose escalation to simultaneously account for immunogenicity and toxicity. It uses lower dose levels as the reference for determining if the current dose level is optimal in terms of immune response. It also ensures subject safety by capping the toxicity rate with a given upper bound. These two criteria are simultaneously evaluated using an intuitive decision region that avoids complicated safety and immunogenicity trade-off elicitation from physicians.

There are several considerations that are clinically necessary for developing the design algorithm. First, we assume that there is a non-decreasing relationship that exists between toxicity and dosage, i.e., the toxicity risk does not decrease as dose level increases. Second, the immune response rate may reach a plateau or even start to decline as the dose level increases.

Notation

For subject ss, let Ds=lD_s=l (l=1,,Ll=1,\ldots,L) denote the received dose level, Ts=1T_s=1 if any DLT event is observed from the subject and 00 otherwise, Rs=1R_s=1 if immune response is achieved for the subject and 00 otherwise.

Let θij(l)=P(T=i,R=jD=l)\theta^{(l)}_{ij}=P(T=i, R=j|D=l) for i,j=0,1i,j=0,1, θ(l)={θij(l):i,j=0,1}\theta^{(l)}=\{\theta_{ij}^{(l)}:i,j=0,1\} and Θ={θ(l):l=1,,L}\Theta = \{\theta^{(l)}: l=1,\ldots,L\}. Furthermore, for dose level ll, let p(l)=P(T=1D=l)=θ10(l)+θ11(l)p^{(l)}=P(T=1|D=l)=\theta_{10}^{(l)}+\theta_{11}^{(l)} be the DLT risk, q(l)=P(R=1D=l)=θ01(l)+θ11(l)q^{(l)}=P(R=1|D=l)=\theta_{01}^{(l)}+\theta_{11}^{(l)} be the immune response probability, and r(l)=θ00(l)θ11(l)/θ01(l)θ10(l)r^{(l)}=\theta_{00}^{(l)}\theta_{11}^{(l)}/\theta_{01}^{(l)}\theta_{10}^{(l)} be the odds ratio. Let nij(l)n_{ij}^{(l)} be the observed number of subjects with T=iT=i and R=jR=j at dose level ll, n(l)={nij(l):i,j=0,1}n^{(l)}=\{n_{ij}^{(l)}:i,j=0,1\} and HH denote all the data observed by the time the current analysis is conducted.

Dose escalation algorithm

The dose escalation algorithm is based on the posterior probability distribution of π(p(l),q(l)H)\pi(p^{(l)}, q^{(l)}|H), where p(l)p^{(l)} and q(l)q^{(l)} represent the DLT risk and immune response rate, respectively, of the current dose level ll, and HH denotes the cumulative data at the time of interim analysis.

Let plp_l denote the lower boundary of DLT risk below which the dose is considered absolutely safe, pup_u denote the upper boundary of DLT risk above which the dose is considered toxic. visit implements a sequential identification approach based on conditional probabilities derived from π(p(l),q(l)H)\pi(p^{(l)}, q^{(l)}|H). Let C1,C2,C3C_1, C_2, C_3 be fixed cut-off values in [0,1][0,1]. The steps are as follows:

Step 1.

If Prob(p(l)>pUH)>C1Prob(p^{(l)} > p_U|H) > C_1, then the current dose level is considered to be too toxic. The trial should be stopped and the next lower dose level should be reported as the recommended dose.

Step 2.

Prob(q(l)qLp(l)pU,H)>C2Prob(q^{(l)} \leq q_L| p^{(l)} \leq p_U, H) > C_2, then the current dose level is considered to be no more effective than its lower dose levels. The trial should be stopped and the next lower dose level should be reported as the recommended dose.

Step 3.

If Prob(p(l)pLp(l)pU,q(l)>qL,H)>C3Prob(p^{(l)} \leq p_L| p^{(l)} \leq p_U, q^{(l)} > q_L, H) > C_3, then the current dose level is considered to be safe and effective. The trial will escalate to dose level l+1l+1.

Step 4.

The current dose level is considered to be uncertain. The trial should continue to treat more patients at dose level ll.

The values of should be chosen C1,C2,C3C_1, C_2, C_3 prior to study initiation and reflect the considerations of the investigators and patients. These thresholds should also give reasonable overall study operating characteristics.

We can see that, based on the posterior distribution of π(p(l),q(l)H)\pi(p^{(l)}, q^{(l)}|H), the currently dose level is in one of the four regions: 1: too toxic, 2: no more effective than its lower dose, 3: safe and effective, and 4: uncertain. These regions are termed as a Decision Map.

Probability models

visit provides several options for the probability models that can be considered for Bayesian inference. The models are non-decreasing with respect to the dose-toxicity relationship and avoid monotonic assumptions for the dose-immune response curve.

Non-parametric model

As one of the simplest models, we posit no assumptions on the dose-toxicity or dose-immune response relationships and assume the outcome data n00,n01,n10,n11n_{00}, n_{01}, n_{10}, n_{11} follow a multinomial distribution.

Non-parametric+ model

This is the simplified non-parametric model with the odds ratios r=1r=1.

Partially parametric model

Compared to non-parametric models, a parametric model may allow the incorporation of dose-toxicity, dose-efficacy, and toxicity-efficacy relationships in dose escalation. In the context of evaluating cancer vaccines, however, it is difficult to posit assumptions on the dose-efficacy relationship, since the immune response rate may even decrease as the dose level increases. On the other hand, it remains reasonable to assume that the dose-toxicity curve is non-decreasing. Therefore, we propose a partially parametric model that only makes assumptions about dose-toxicities but leaves the dose-immune response relationship unspecified.

Specifically, we construct the dose-toxicity model as:

logp(l)=eαlogτ(l).\log p^{(l)}= e^\alpha \log \tau^{(l)}.

The τ(l)\tau^{(l)}'s are deterministic design parameters reflecting the expectation of the DLT risk at dose level ll with τ(l)>τ(l)\tau^{(l)} > \tau^{(l')} for l>ll> l'.

For the immune response and the odds ratio, we assume q(l)q^{(l)} and r(l)r^{(l)} at different dose levels are independent a priori.

Partially parametric+ model

This is the simplified partially parametric model with the odds ratios r=1r=1.

Graphical user interface

This package provides a web-based graphical user interface developed using R Shiny. See vtShiny for details.

References

Wang, C., Rosner, G. L., & Roden, R. B. (2019). A Bayesian design for phase I cancer therapeutic vaccine trials. Statistics in medicine, 38(7), 1170-1189.


Parameters

Description

Parameters that are shared by multiple functions

Arguments

obs.y

Observed data matrix with ll rows and 4 columns. Row kk in the matrix represents the observed data from dose level kk. The columns are

  • column 1: number of patient with no DLT, no immune response

  • column 2: number of patient with no DLT, immune response

  • column 3: number of patient with DLT, no immune response

  • column 4: number of patient with DLT, immune response

prob.mdl

Option of the probability models:

  • NONPARA: non-parametric+ model

  • NONPARA+: non-parametric model

  • PARA: partially parametric model

  • PARA+: partially parametric+ model

Default value is NONPARA. See visit for details.

priors

A class VTPRIOR object created by vtPriorPar for PARA and PARA+ model.

etas

Vector of length 2 representing (pL,pU)(p_L, p_U). pLp_L: lower bound of DLT risk, below which the current dose is considered absolutely safe; pUp_U: upper bound of DLT risk above which the current dose is considered too toxic

prev.res

Response rate from the next lower dose level, say, l1l-1. This can be a scalar representing the mean of the response rate E(q(l1))E(q^{(l-1)}), or a vector of posterior samples of the response rate q(l1)q^{(l-1)}. For l=1l=1, this value is set to 00.

dec.cut

Thresholds C1,C2,C3C_1,C_2,C_3. If the vector length is shorter than 33, it is repeated to have 33 elements. See visit for details.

digits

Digits for print

seed

Random seed

...

Reserved parameters


Plot decision map

Description

Plot a decision map based on a class VTDEC object that contains the current posterior analysis results

Usage

## S3 method for class 'VTDEC'
plot(x, margin = 0.003, nms = c("TT", "NME", "SE",
  "UN"), col.reg = "pink", col.prob = "blue", cex.prob = 0.9,
  cex.nms = 1, ...)

Arguments

x

A class VTDEC list generated by vtDecMap

margin

Margin between regions in the decision map

nms

Labels of the regions on a decision map. Defaults are:

  • TT:Too Toxic

  • NME:No More Effective

  • SE:Safe and Effective

  • UN:Uncertain

col.reg

Background color of the selected region

col.prob

Text color of the selected region.

cex.prob

Text size of the probabilities

cex.nms

Text size of the region labels

...

Optional arguments for plot.

Examples

etas       <- c(0.1, 0.3)
dec.cut    <- c(0.6,0.6,0.6)
cur.obs.y  <- c(3, 2, 1, 1)
prev.obs.y <- c(5, 2, 0, 0)
rst.inter  <- vtInterim(cur.obs.y,  prev.obs.y = prev.obs.y,
                        prob.mdl = "NONPARA", etas = etas, dec.cut = dec.cut,
                        nsmp = 2000);
plot(rst.inter)

Plot true parameters

Description

Plot true DLT risk rates and response rates.

Usage

## S3 method for class 'VTTRUEPS'
plot(x, draw.levels = NULL, draw.curves = 1:6,
  legends = NULL, ltys = c(1, 1, 2, 2, 2, 2), pch = 19:24,
  ylim = c(0, 1), cols = c("red", "blue", "brown", "black", "gray",
  "green"), add.legend = TRUE, ...)

Arguments

x

A class VTTRUEPS matrix generated by vtScenario

draw.levels

Select dose levels to draw. Default NULL draws all levels.

draw.curves

Indicate which curves to plot. The options are

  • 1:p: DLT risk rate

  • 2:q: Response rate

  • 3:θ00\theta_{00}

  • 4:θ01\theta_{01}

  • 5:θ10\theta_{10}

  • 6:θ11\theta_{11}

See visit for details.

legends

Line legends

ltys

Line types

pch

Line PCH

ylim

Y limits

cols

Line colors

add.legend

Include legends (TRUE) or not (FALSE)

...

optional arguments for plot

Examples

rst.sce <- vtScenario(tox = c(0.05, 0.05, 0.08),
                      res = c(0.2, 0.3, 0.5),
                      rho = 1)
plot(rst.sce, draw.levels = 1:2, draw.curves=1:6)

Summarize simulation results

Description

Summarize the simulation results with numerous statistical measures

Usage

## S3 method for class 'VTSIMU'
summary(object, ...)

Arguments

object

A class VTSIMU list generated by vtSimu

...

Reserved parameters

Value

A list containing

  • dose: Frequency for each dose level being selected as the optimal dose level

  • npat: Average number of patients for each cohort and each dose level

  • samples: Average number of DLT risks and responses for each cohort on each dose level

  • decision: Frequency each region in the decision map is selected for each cohort on each dose level

  • prob: Average conditional probabilities corresponding to each region in the decision map for each cohort on each dose level

  • ptox: Mean and credible interval of DLT risk rates for each cohort on each dose level

  • pres: Mean and credible interval of immune response rates for each cohort on each dose level

Examples

rst.sce <- vtScenario(tox = c(0.05, 0.05, 0.08),
                      res = c(0.2, 0.3, 0.5),
                      rho = 1)
rst.simu  <- vtSimu(n.rep = 50, n.cors = 2, trueps = rst.sce,
                    size.cohort=3, size.level=12,
                    prob.mdl="NONPARA");
sum.simu <- summary(rst.simu)

Print true probabilities

Description

Print the true probabilities, with probabilities of toxicity and resistance, and ρ\rho.

Usage

## S3 method for class 'VTTRUEPS'
summary(object, digits = 2, ...)

Arguments

object

A class VTTRUEPS matrix generated by vtScenario

digits

Digits for print

...

Reserved parameters

Value

A table showing the summary of the VTTRUEPS object. The first four columns are individual probability, fifth and sixth are probability for toxicity and resistance, and seventh is rho, the correlation.

Examples

rst.sce <- vtScenario(tox = c(0.05, 0.05, 0.08),
                      res = c(0.2, 0.3, 0.5),
                      rho = 1)
summary(rst.sce)

S3 Summary function

Description

S3 Summary function

Usage

summary2(x, ...)

Arguments

x

object

...

reserved parameters


Summarize simulation results

Description

Summarize simulation results to get the frequency of a dose level is identified as the optimal dose level and the number of DLT's and responses

Usage

## S3 method for class 'VTSIMU'
summary2(x, ...)

Arguments

x

A class VTSIMU list generated by vtSimu

...

Reserved parameters

Value

A numeric array that shows 1: number of times each level is selected, 2. total number of times any level is selected, 3. frequency each level is selected, 4. frequency any level is selected, 5. average number of DLT's and responders for each level, 6. average total number of DLT's and responders

Examples

rst.sce <- vtScenario(tox = c(0.05, 0.05, 0.08),
                      res = c(0.2, 0.3, 0.5),
                      rho = 1)
rst.simu  <- vtSimu(n.rep = 20, n.cors = 2, trueps = rst.sce,
                    size.cohort=3, size.level=12,
                    prob.mdl="NONPARA");
sum.simu <- summary2(rst.simu)

Print true probabilities in latex format

Description

Print the true probabilities, with probabilities of toxicity and resistance, and ρ\rho, in latex format

Usage

## S3 method for class 'VTTRUEPS'
summary2(x, rp2d = -1, digits = 2, ...)

Arguments

x

A class VTTRUEPS matrix generated by vtScenario

rp2d

Columns to be in bold font

digits

Digits for print

...

Reserved parameters

Value

A summary of the true probabilities in latex format.

Examples

rst.sce <- vtScenario(tox = c(0.05, 0.05, 0.08),
                      res = c(0.2, 0.3, 0.5),
                      rho = 1)
ltx.ps <- summary2(rst.sce)

Obtain decision map information

Description

Summarize the posterior distribution of θ00(l),θ01(l),θ10(l),θ11(l)\theta^{(l)}_{00}, \theta^{(l)}_{01}, \theta^{(l)}_{10}, \theta^{(l)}_{11} and get information for making dose escalation decisions

Usage

vtDecMap(thetas, etas, prev.res = 0, dec.cut = 0.6)

Arguments

thetas

Posterior samples of θ\theta, a class VTPOST matrix generated by vtPost

etas

Vector of length 2 representing (pL,pU)(p_L, p_U). pLp_L: lower bound of DLT risk, below which the current dose is considered absolutely safe; pUp_U: upper bound of DLT risk above which the current dose is considered too toxic

prev.res

Response rate from the next lower dose level, say, l1l-1. This can be a scalar representing the mean of the response rate E(q(l1))E(q^{(l-1)}), or a vector of posterior samples of the response rate q(l1)q^{(l-1)}. For l=1l=1, this value is set to 00.

dec.cut

Thresholds C1,C2,C3C_1,C_2,C_3. If the vector length is shorter than 33, it is repeated to have 33 elements. See visit for details.

Details

This function summarizes the posterior distribution of the θ00(l),θ01(l),θ10(l),θ11(l)\theta^{(l)}_{00}, \theta^{(l)}_{01}, \theta^{(l)}_{10}, \theta^{(l)}_{11} and sequentially get the conditional probabilities of each decision map region. See visit for details of the decision map regions.

Value

A class VTDEC list. See the return value from vtInterim for details.

Examples

etas     <- c(0.1, 0.3)
dec.cut  <- c(0.6,0.6,0.6)
obs.y    <- rbind(c(5, 2, 0, 0))
rst.post <- vtPost(obs.y,  prob.mdl = "NONPARA", nsmp = 2000)
dec.map  <- vtDecMap(rst.post, etas = etas, dec.cut = dec.cut)

Conduct interim analysis

Description

Conduct an interim analysis for determining dose escalation actions

Usage

vtInterim(cur.obs.y, prev.obs.y = NULL, prev.res = NULL,
  etas = c(0.1, 0.3), dec.cut = 0.65, priors = NULL,
  prob.mdl = c("NONPARA", "NONPARA+", "PARA", "PARA+"), seed = NULL,
  ...)

Arguments

cur.obs.y

Observed data from the current level, which is a vector of length 4. The numbers correspond to obs.y in vtPost.

prev.obs.y

Observed data from previous levels, which has the same structure as obs.y in vtPost.

prev.res

Response rate from the next lower dose level, say, l1l-1. This can be a scalar representing the mean of the response rate E(q(l1))E(q^{(l-1)}), or a vector of posterior samples of the response rate q(l1)q^{(l-1)}. For l=1l=1, this value is set to 00.

etas

Vector of length 2 representing (pL,pU)(p_L, p_U). pLp_L: lower bound of DLT risk, below which the current dose is considered absolutely safe; pUp_U: upper bound of DLT risk above which the current dose is considered too toxic

dec.cut

Thresholds C1,C2,C3C_1,C_2,C_3. If the vector length is shorter than 33, it is repeated to have 33 elements. See visit for details.

priors

A class VTPRIOR object created by vtPriorPar for PARA and PARA+ model.

prob.mdl

Option of the probability models:

  • NONPARA: non-parametric+ model

  • NONPARA+: non-parametric model

  • PARA: partially parametric model

  • PARA+: partially parametric+ model

Default value is NONPARA. See visit for details.

seed

Random seed

...

Additional arguments for vtPost

Details

Using data from previous levels and the current level to conduct Bayesian analysis, get the decision map information and make decision about dose escalation actions. The actions include stop the trial, escalate to the next higher dose level, or enroll more patients in the current level. See visit for details.

Value

A class VTDEC list containing

  • prob: Probabilities of each decision map region

  • region: The region selected based on the sequential procedure described in visit

  • ptox: Mean risk of DLT, E(p(l))E(p^{(l)})

  • pres: Mean immune response rate, E(q(l))E(q^{(l)})

  • con.prob: Conditional probabilities of each decision map region

  • prev.res: Function parameter

  • etas: Function parameter

  • dec.cut: Function parameter

Examples

etas       <- c(0.1, 0.3)
dec.cut    <- c(0.6,0.6,0.6)
cur.obs.y  <- c(3, 2, 1, 1)
prev.obs.y <- c(5, 2, 0, 0)
rst.inter  <- vtInterim(cur.obs.y,  prev.obs.y = prev.obs.y,
                        prob.mdl = "NONPARA", etas = etas,
                        dec.cut = dec.cut,
                        nsmp = 2000);

Postetrior sampling for given observed samples

Description

Call STAN to draw posterior samples of the joint distribution of immunogenicity rate and toxicity risk

Usage

vtPost(obs.y, prob.mdl = c("NONPARA", "NONPARA+", "PARA", "PARA+"),
  priors = NULL, ..., nsmp = 4000, prior.const = 0.5)

Arguments

obs.y

Observed data matrix with ll rows and 4 columns. Row kk in the matrix represents the observed data from dose level kk. The columns are

  • column 1: number of patient with no DLT, no immune response

  • column 2: number of patient with no DLT, immune response

  • column 3: number of patient with DLT, no immune response

  • column 4: number of patient with DLT, immune response

prob.mdl

Option of the probability models:

  • NONPARA: non-parametric+ model

  • NONPARA+: non-parametric model

  • PARA: partially parametric model

  • PARA+: partially parametric+ model

Default value is NONPARA. See visit for details.

priors

A class VTPRIOR object created by vtPriorPar for PARA and PARA+ model.

...

additional parameters for package rstan's sampling method. These options include warmup, thin, algorithm. See rstan::sampling for details.

nsmp

number of iterations

prior.const

Specify α\alpha for a Beta(α\alpha, α\alpha) prior. The Beta prior is used for NONPARA and NONPARA+ models. Default value 0.50.5.

Value

A class VTPOST matrix of posterior samples with nsmp rows and 4 columns. Columns 1-4 correspond toθ00(l),θ01(l),θ10(l),θ11(l)\theta^{(l)}_{00}, \theta^{(l)}_{01}, \theta^{(l)}_{10}, \theta^{(l)}_{11}. See visit for details about θ\theta's.

Examples

obs.y    <- rbind(c(5, 2, 0, 0), c(3, 4, 0, 0), c(1, 6, 0, 0))
prior <- vtPriorPar(prior.y = NULL, tau = c(0.1, 0.3, 0.6), sdalpha=10, sdrho=10, vtheta=NULL)
rst.post <- vtPost(obs.y, priors = prior, warmup = 100, prob.mdl = "PARA", nsmp = 200)

Get prior distribution parameters

Description

Get prior distribution parameters for partially parametric or partially parametric+ models

Usage

vtPriorPar(prior.y = NULL, tau = NULL, sdalpha = 10, sdrho = 10,
  vtheta = NULL)

Arguments

prior.y

Historical data for generating prior parameters. It has the same structure as obs.y in vtPost.

tau

Vector of τ\tau values. See visit for details. Can not be NULL if prior.y is NULL.

sdalpha

σα\sigma_\alpha. See visit for details.

sdrho

σρ\sigma_\rho.

vtheta

Additional variance term for eliciting prior parameters from prior.y

Details

The priors are specified as q(l)Beta(aq(l),bq(l))q^{(l)} \sim Beta(a_q^{(l)}, b_q^{(l)}), and logρ(l)N(0,σρ2)\log\rho^{(l)} \sim N(0, \sigma_\rho^2).

Value

A VTPRIOR list with

  • TAU:vector of τ\tau's for each level

  • ABCD:A matrix of 4 columns: aqa_q, bqb_q, aρa_\rho, σρ{\sigma_\rho}. Each row represents a dose level.

Examples

par.prior <- vtPriorPar(tau = c(0.2, 0.4, 0.6), sdalpha = 10);

Set simulation scenario

Description

Simulation function. Get true θ\theta's using marginal probabilities and odds ratio ρ\rho for all dose levels.

Usage

vtScenario(tox = c(0.05, 0.05, 0.08), res = c(0.2, 0.3, 0.5),
  rho = 1)

Arguments

tox

Vector of marginal DLT risk rates for all levels

res

Vector of marginal immune response rates for all levels

rho

Vector of odds ratio for all levels. If length of rho is shorter than the length of tox or res, vector rho is repeated to have the same length as tox and res.

Details

The calculation is as following. If ρ=1\rho = 1, then θ11=pq\theta_{11} = pq, θ01=(1p)q\theta_{01} = (1-p)q, θ10=p(1q)\theta_{10} = p(1-q), and θ00=(1p)(1q)\theta_{00} = (1-p)(1-q). Otherwise, θ11=(A+B\theta_{11} = -(\sqrt{A+B}, θ01=qθ11\theta_{01} = q-\theta_{11}, θ10=pθ11\theta_{10} = p-\theta_{11}, and θ00=θ01θ10ρ/θ11\theta_{00} = \theta_{01}\theta_{10}\rho/\theta_{11}, where A=(p+qpρqρ1)24(ρ1)pqρ)A=(p+q-p \rho-q\rho-1)^2-4(\rho-1)pq\rho) and B=(p+qpρqρ1))/2/(ρ1)B=(p+q-p\rho-q\rho-1))/2/(\rho-1).

Value

a VTTRUEPS object containing all θ\theta's in a matrix with its number of rows equaling the number of dose levels and its number of columns being 4.

Examples

rst.sce <- vtScenario(tox=c(0.05, 0.05, 0.08), res=c(0.2, 0.3, 0.5), rho=1)

Run Web-Based visit application

Description

Call Shiny to run visit as a web-based application.

Usage

vtShiny()

Details

A web browser will be brought up for users to access the GUI of visit.

Examples

## Not run: 
vtShiny()
## End(Not run)

Conduct simulation study

Description

Simulate clinical trials with given settings for multiple times to evaluate the study operating characteristics.

Usage

vtSimu(n.rep = 100, seed = NULL, ..., n.cores = 1,
  update.progress = NULL)

Arguments

n.rep

Number of repetitions

seed

Seed

...

Optional parameters for vtSingleTrial

n.cores

Number of cores for parallel computations

update.progress

Reserved parameter for Shiny GUI

Value

A class VTSIMU list with length n.rep of results. Each item is a list return from vtSingleTrial.

Examples

rst.sce <- vtScenario(tox = c(0.05, 0.05, 0.08),
                      res = c(0.2, 0.3, 0.5),
                      rho = 1)

rst.simu  <- vtSimu(n.rep = 100, n.cors = 2, trueps = rst.sce,
                    size.cohort=3, size.level=12, prob.mdl="NONPARA");

Simulate a single trial

Description

Simulation function for simulating a single trial

Usage

vtSingleTrial(trueps, size.cohort = 3, size.level = NULL,
  etas = c(0.1, 0.3), dec.cut = 0.65, prob.mdl = c("NONPARA",
  "NONPARA+", "PARA", "PARA+"), priors = NULL, ...)

Arguments

trueps

True θ\theta's. A VTTRUEPS object made from vtScenario

size.cohort

Size of each cohort

size.level

Maximum number of patients for each dose level

etas

Vector of length 2 representing (pL,pU)(p_L, p_U). pLp_L: lower bound of DLT risk, below which the current dose is considered absolutely safe; pUp_U: upper bound of DLT risk above which the current dose is considered too toxic

dec.cut

Thresholds C1,C2,C3C_1,C_2,C_3. If the vector length is shorter than 33, it is repeated to have 33 elements. See visit for details.

prob.mdl

Option of the probability models:

  • NONPARA: non-parametric+ model

  • NONPARA+: non-parametric model

  • PARA: partially parametric model

  • PARA+: partially parametric+ model

Default value is NONPARA. See visit for details.

priors

A class VTPRIOR object created by vtPriorPar for PARA and PARA+ model.

...

Optional arguments for vtPost

Value

  • dose: Optimal dose level

  • n.patients: Number of patients for each dose level and each cohort

  • ptox: Posterior mean of DLT risk rate after each interim analysis

  • pres: Posterior mean of immune response rate after each interim analysis

  • region: Identified region in the decision map after each interim analysis

  • prob: Posterior mean of θ\theta's after each interim analysis

  • smps: Observed data after each cohort

Examples

rst.sce <- vtScenario(tox = c(0.05, 0.05, 0.08),
                      res = c(0.2, 0.3, 0.5),
                      rho = 1)
rst.simu  <- vtSingleTrial(trueps = rst.sce, size.cohort=3, size.level=12,
                           prob.mdl="NONPARA");

Call STAN models for MCMC sampling

Description

Call STAN to draw posterior samples of the joint distribution of immunogenicity rate and toxicity risk for parametric and parametric+ model

Usage

vtStan(obs.y, priors, model = 0, iter = 4000, chains = 4,
  warmup = 2000, ...)

Arguments

obs.y

Observed data matrix with ll rows and 4 columns. Row kk in the matrix represents the observed data from dose level kk. The columns are

  • column 1: number of patient with no DLT, no immune response

  • column 2: number of patient with no DLT, immune response

  • column 3: number of patient with DLT, no immune response

  • column 4: number of patient with DLT, immune response

priors

A class VTPRIOR object created by vtPriorPar for PARA and PARA+ model.

model

option of the probability models:

0:

parametric model

1:

parametric+ model

See visit for details.

iter

STAN option: number of iterations

chains

STAN option: number of chains

warmup

STAN option: number of warmup

...

additional parameters for package rstan's sampling method. These options include iter, warmup, thin, algorithm. See rstan::sampling for details.

Value

A rstan object that contains the posterior sampling results


Plot the track plot of dose escalation

Description

Generate a plot representing the observed data and dose escalation decisions.

Usage

vtTrack(obs.all, cex.txt = 0.9, decision = 1, max.level = NULL,
  letters = c("E", "C", "S"), colors = c("green", "yellow", "red"),
  height = 0.5, end.width = 2, end.height = height,
  cex.roman = 0.9, cex.end = 0.9, ...)

Arguments

obs.all

All observations collected in a matrix with 5 columns. Column 1 is the index of interim analysis starting from 1. Columns 2-5 correspond to columns 1-4 in obs.y for vtPost.

cex.txt

Text size of numbers in the plot

decision

Dose escalation decision. The options are

  • 1: Escalate

  • 2: Continue at the same level

  • 3: Stop the trial

max.level

Maximum number of dose levels shown in the plot

letters

Labels for dose escalation actions 1-3. Default values are "E", "C", "S"

colors

Possible colors in the last action box

height

Height of each individual box

end.width

Width of the last action box

end.height

Height of the last action box

cex.roman

Text size of the roman numerals

cex.end

Text size of the letter in the last action box

...

Optional arguments for plot.

Examples

obs.all  <- rbind(c(1, 5, 2, 0, 0),
                  c(2, 3, 4, 0, 0),
                  c(3, 1, 6, 0, 0));
vtTrack(obs.all, end.width = 0.8, max.level = 3, decision = 3);