adjustMet2: Phase III sample size adjustment factor (Method 2).

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

adjustMet2 calculates the multiplicative ajustment factor ρ to be applied to Phase III sample size estimate using Method 2 proposed by Nhacolo and Brannath (in press).

Usage

1
2
3
4
adjustMet2(p2d, p2r, p2e, p2p0 = NULL, p2p1 = NULL, p2a = NULL,
  p2b = NULL, p3p0 = NULL, p3p1 = NULL, p3a = NULL, p3b = NULL,
  nsimul = 5000, seed = NULL, rhorange = c(0.5, 5), p3mpt = 0.001,
  rhot = 1e-04)

Arguments

p2d

Dataframe with Phase II design, with similar as in EKOptAdaptDesigns.

p2r

Dataframe containing results of Phase II trials following the design p2d. It is the output of the function AnalyzeEKOAD.

p2e

Phase II estimate to consider among the estimates used by codeAnalyzeEKOAD. It can be "pip" (naive MLE) or one of the four estimates from methods proposed by Nhacolo and Brannath (2018): "pim1", "pim2", "pim2v2" or "pim3".

p2p0

Phase II response rate under H_0. If NULL (default), the value is taken p2d.

p2p1

Phase II response rate under H_1. If NULL (default), the value is taken p2d.

p2a

Phase II type I error rate. If NULL (default), the value is taken p2d.

p2b

Phase II type II error rate. If NULL (default), the value is taken p2d.

p3p0

Phase III response rate of the control group. If NULL (default), the value is set to p2p0.

p3p1

Phase III response rate of the treatment group. If NULL (default), the value is set to p2p1.

p3a

Phase III type I error rate. If NULL (default), the value is set p2a.

p3b

hase III type II error rate. If NULL (default), the value is set p2b.

nsimul

Number of (parametric) bootstrap samples (default 5000).

seed

Seed for random number generator. If NULL (default), no seed is set.

rhorange

A vector specifying a range to serach for ρ. The default is c(0.5,5).

p3mpt

Tolerated error margin for the power, i.e., maximum allowed absolute diference between the estimated expected power and the target. The default is 0.001.

rhot

Search for ρ is interrupted and deem unsuccessful if the absolute difference between current and the previous is less than or equal to rhot.

Details

The aim of the adjustment is to get an adequately powered Phase III trial based on Phase II data. ρ is found using numerical rearch. See the documentation of the function AnIItoIIIRe for more details about the designs.

Value

A list containing two dataframes final and intermed. final contains the final measures for the adjustment factor (ρ), and for the unadjusted and adjusted power. intermed holds the intermediate results (of each bootstrap sample).

Author(s)

Arsenio Nhacolo

References

Nhacolo, A. and Brannath, W. Using Estimates from Adaptive Phase II Oncology Trials to Plan Phase III Trials. In press.

Nhacolo, A. and Brannath, W. Interval and point estimation in adaptive Phase II trials with binary endpoint. Stat Methods Med Res, 2018.

Ahn, C., Heo, M. and Zhang, S. Sample Size Calculations for Clustered and Longitudinal Outcomes in Clinical Research. CRC Press, 2014.

See Also

adjustMet2, SimulateEKOAD, AnalyzeEKOAD.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Not run: 
vdid <- c(6,10) # design ids
vp2est <- c("pip","pim1","pim2","pim2v2","pim3")
nse <- 1000#number of simulations for each phase
cur <- 1; tot <- length(vdid)*length(vp2est)
for (did in vdid){
 for (p2est in vp2est){
   cat('Processing ',cur,' of ',tot,' (',100*round(cur/tot,1),'%)\n',sep = '')
    load(paste0("p2r",did,".rdata")) # output of the function AnalyzeEKOAD
    out <- adjustMet2(p2d = EKOADwn[EKOADwn$id==did,], p2r = rslt[1:nse,], p2e = p2est, nsimul = nse, seed = 3343)
    write.csv(out$final,file = paste0("final",did,p2est,".csv"),row.names = FALSE)
   write.csv(out$intermed,file = paste0("intermed",did,p2est,".csv"),row.names = FALSE)
   cur <- cur+1
 }
}


vdid <- c(6,10)
vp2est <- c("pip","pim1","pim2","pim2v2","pim3")
fa <- data.frame()
for (did in vdid)
{
 for (p2est in vp2est){
    f <- read.csv(paste0("final",did,p2est,".csv"))
    fn <- names(f)
    f$dsgn <- did
    f <- f[,c('dsgn',fn)]
    fa <- rbind(fa,f)
  }
}
write.csv(fa,file = "final_all.csv",row.names = FALSE)

## End(Not run)

arsenionhacolo/InferenceBEAGSD documentation built on May 9, 2019, 4:10 a.m.