Skip to contents

Specifies a proof-of-concept study with two binary endpoints: the sample sizes, the Dirichlet prior distributions, the external data, the form of the control group, the decision criterion for two endpoints and the computation settings. The design is used by qdm_decide, qdm_oc and qdm_calibrate.

Usage

design_binary2(
  n_t,
  n_c,
  prior_t,
  prior_c = NULL,
  criterion,
  external_t = NULL,
  external_c = NULL,
  hypothetical_c = NULL,
  fixed_c = NULL,
  nMC = 10000L,
  enumerate = TRUE
)

Arguments

n_t

Number of subjects in the treatment group (a whole number of at least 1).

n_c

Number of subjects in the concurrent control group (a whole number of at least 0).

prior_t, prior_c

Dirichlet prior distributions of the four cell probabilities of the treatment and control groups, created by prior_dirichlet. prior_c must be NULL (the default) for a fixed control and is required otherwise.

criterion

Decision criterion for two endpoints, created by criterion_posterior or criterion_predictive. Its argument direction sets whether larger or smaller effects are favorable on each endpoint.

external_t, external_c

External data of the treatment and control groups, created by borrow with data_binary2, or NULL (no external data).

hypothetical_c

Hypothetical control, created by hypothetical with data_binary2, or NULL. It can be used only when n_c = 0.

fixed_c

Fixed control response rates of endpoints 1 and 2, a numeric vector of length 2 with values from 0 to 1, or NULL. It can be used only when n_c = 0.

nMC

Number of Monte Carlo draws for posterior probabilities.

enumerate

Logical; if TRUE (the default), the operating characteristics are computed by enumerating all outcomes, otherwise by simulation.

Value

An object of class c("qdm_design_binary2", "qdm_design"), a list with the arguments and the element control ("concurrent", "external", "hypothetical" or "fixed").

Details

The responses of a subject on the two endpoints fall into one of the four cells "00", "01", "10" and "11" (first digit: endpoint 1), whose probabilities have Dirichlet prior distributions in each group (Yamaguchi et al., submitted, Appendix A.1). The treatment effects are the differences of the marginal response rates, \(\theta_k = \pi_{tk} - \pi_{ck}\) with \(\pi_1 = p_{10} + p_{11}\) and \(\pi_2 = p_{01} + p_{11}\). External data with counts \(x_e\) enter through a power prior with weight \(a_0\), which adds \(a_0 x_e\) to the Dirichlet parameters. The control group takes one of four forms, as in design_binary: a concurrent control group (n_c of at least 1), external control data only (n_c = 0 and external_c), a hypothetical control (n_c = 0 and hypothetical_c created from data_binary2, whose counts are added to prior_c; the hypothetical control distribution Dir(beta) of Yamaguchi et al., Appendix A.1.6, is obtained with prior_c = prior_dirichlet(beta - counts)), or a fixed control (n_c = 0 and fixed_c, the known response rates of the two endpoints in the control group; prior_c must then be NULL). With a fixed control, the posterior probabilities are estimated from draws of the treatment distribution only, and the future effects of the predictive criterion are \(S_{tk} / m_t - \pi_{ck}\) (a future effect that differs from the null value by less than \(10^{-10}\) is treated as equal to it; m_c is not used).

The posterior probabilities of the regions (posterior criteria) are estimated by Monte Carlo simulation with nMC draws from the Dirichlet posterior distributions. The posterior predictive probabilities (predictive criteria) are computed exactly: the future effects depend only on the numbers of responders on each endpoint, whose joint distribution in each group is obtained from the Dirichlet-multinomial distribution, and a future effect equal to a null value is not counted as larger.

For qdm_oc and qdm_calibrate, with enumerate = TRUE all outcomes of the study are enumerated: there are choose(n + 3, 3) outcomes in a group of n subjects (286 for n = 10), and the probabilities of the regions are computed for every pair of treatment and control outcomes, with the same Monte Carlo draws for all pairs. For a posterior criterion the computing time is proportional to the number of pairs times nMC, and enumeration is limited to 1e7 pairs (for example, 24 subjects in each group). With enumerate = FALSE, nsim studies are simulated under each scenario, which is faster for large sample sizes.

References

Yamaguchi, Y., Hu, H., Huang, Y., Han, C., Homma, G. and Wang, A. (submitted). Bivariate Bayesian quantitative decision-making for two endpoints in rare disease drug development.

Examples

# Case study 1 of Yamaguchi et al. (submitted), with a small nMC for speed
des <- design_binary2(
  n_t = 10, n_c = 10,
  prior_t = prior_dirichlet(rep(0.25, 4)),
  prior_c = prior_dirichlet(rep(0.25, 4)),
  criterion = criterion_posterior(theta_tv = c(0.15, 0.15),
                                  theta_mav = c(0.10, 0.10),
                                  gamma_go = 0.263, gamma_nogo = 0.347),
  nMC = 2000
)
des
#> Design: two binary endpoints
#>   Treatment: n = 10, prior Dirichlet(alpha = (0.25, 0.25, 0.25, 0.25))
#>   Control: concurrent, n = 10, prior Dirichlet(alpha = (0.25, 0.25, 0.25, 0.25))
#> Posterior probability criterion
#>   Go:   P(regions {1} | data) >= 0.263
#>   NoGo: P(regions {9} | data) >= 0.347
#>   TV = (0.15, 0.15), MAV = (0.1, 0.1)
#> Probabilities: Monte Carlo simulation (nMC = 2000)
#> Operating characteristics: enumeration of all outcomes
qdm_decide(des, data_t = data_binary2(c(3, 2, 2, 3)),
           data_c = data_binary2(c(6, 2, 1, 1)), seed = 1)
#> Decision: Go
#>   Go:   P(regions {1} | data) = 0.4445 (threshold 0.263, met)
#>   NoGo: P(regions {9} | data) = 0.0835 (threshold 0.347, not met)
#> Region probabilities: R1 = 0.4445, R2 = 0.0745, R3 = 0.227, R4 = 0.0365, R5 = 0.011, R6 = 0.0215, R7 = 0.082, R8 = 0.0195, R9 = 0.0835
#> Posterior distributions
#>   Treatment: Dirichlet(alpha = (3.25, 2.25, 2.25, 3.25))
#>   Control:   Dirichlet(alpha = (6.25, 2.25, 1.25, 1.25))