get.Q.bwer: Get Efficacy Cutoff based on Basket-Wise Error Rate (BWER)...

View source: R/get.Q.bwer.R

get.Q.bwerR Documentation

Get Efficacy Cutoff based on Basket-Wise Error Rate (BWER) Control

Description

Get Efficacy Cutoff based on Basket-Wise Error Rate (BWER) Control

Usage

get.Q.bwer(object, alpha = 0.1, digits = 3, Qclust = NULL)

Arguments

object

returned by post.infer.

alpha

basket-wise type I error control.

digits

number of digits in the cutoffs.

Qclust

NULL means all cutoffs are different; If there are B=5 baskets and Qclust=(1,1,2,2,2), it means cutoffs for the first two baskets will be the same and another cutoff will be tuned separately for baskets 3-5.

Value

It returns the efficacy cutoffs.

Examples

N <- rbind(
c(10, 25),
c(10, 25),
c(10, 25),
c(10, 25),
c(10, 25)) # interim sample size and total sample size for each indication
scenarios <- rbind( c(0.15, 0.15, 0.15, 0.15, 0.15), c(0.3, 0.3, 0.3, 0.3, 0.3) )
res <- generate.data(N = N, ORRs = scenarios, ntrial = 1000, seed = 343809)
post <- post.infer(res, pnull = rep(0.15,5), stopbounds = cbind(c(1,1,1,1,1)),
ModelFit = "localPP", method = "PEB", a = 2, delta = 0.3)
(Q <- get.Q.bwer(post, alpha = 0.1, digits = 3, Qclust = rep(1, 5)))
Qmat <- array(NA, dim = dim(post$postprob))
for(i in 1:5) Qmat[,,i] <- Q[i]
apply(post$postprob>Qmat, c(1,3), mean)

BasketTrial documentation built on June 18, 2025, 5:08 p.m.