Decision: Take Decision in a GSD

View source: R/Decision.R

DecisionR Documentation

Take Decision in a GSD

Description

Maps the statistical results at an interim, decision or final analysis into a decision regarding whether to stop recruitment (interim) or whether to reject the null hypothesis (decision/final). Stopping boundaries are updated based on observed information and correct p-values, confidence intervals and point estimates are given.

Usage

Decision(object, k, type.k, PositiveIsGood = TRUE, trace = TRUE)

Arguments

object

object of class delayedGSD, typically output from CalcBoundaries.

k

[integer] index of the analysis.

type.k

[character] type of analysis: "interim" (after continuing recruitment), "decision" (after stopping recruitment for efficacy or futility), or "final" (after reaching the last stage of the trial).

PositiveIsGood

[logical] whether a positive effect is considered beneficial (TRUE/FALSE)

trace

[logical] should the execution of the function be traced?

Details

Function that maps the statistical results at interim (or final) analysis into decision to reject, or continue or stop inclusind subjects.

Value

ff

Author(s)

Paul Blanche

Examples


#### Planning #####
theAlpha <- 0.025
theBeta <- 0.2
theDelta <- 1.5
theK <- 2
theN <- 82

myBound0 <- CalcBoundaries(kMax=theK,
                     sided=1,
                     alpha=theAlpha,
                     beta=theBeta,
                     InfoR.i=c(0.5,1),
                     rho_alpha=2,
                     rho_beta=2,
                     method=1,
                     delta=theDelta,
                     InfoR.d=0.55)

#### Simulate data ####
## generate data with all data for in case trial completes
set.seed(10)
theData <- GenData(n=theN*2,delta=theDelta*0.8,ar=5)  

theAR <- 10  #accrual rate (pt per month)
theDelay <- 0.7500001  #time in months to process data
tau.i <- theData$d$t3[theN + ceiling(theAR*theDelay)] #time point at which to do IA

theObsData <- SelectData(theData$d, t = tau.i, Delta.t = theDelay)

#### Analyse data at interim ####
myLMM <- analyzeData(theObsData)
myBound1 <- updateBoundaries(myBound0, lmm = myLMM, k = 1, type.k = "interim")
myInterim1 <- Decision(myBound1, k = 1, type.k = "interim")
myInterim1$conclusion

paulowhite/DelayedGSD documentation built on Nov. 1, 2023, 5:36 p.m.