Skip to contents

In this version, the analysis for efficacy is to assume a beta prior to compute the posterior probability that experimental is better than standard of care Futility is based on a low posterior probability, eg it is unlikely that experimental is better than standard of care

Usage

AnalyzeUsingBetaBinomial(SimData, DesignParam, LookInfo, UserParam = NULL)

Arguments

SimData

Data frame which consists of data generated in current simulation.

DesignParam

Input Parameters which user may need to compute test statistic and perform test. User should access the variables using names, for example, DesignParam$Alpha, and not order.

LookInfo

List Input Parameters related to multiple looks which user may need to compute test statistic and perform test. User should access the variables using names, for example LookInfo$NumLooks and not order. Other important variables in group sequential designs are: LookInfo$NumLooks An integer value with the number of looks in the study LookInfo$CurrLookIndex An integer value with the current index look, starting from 1 LookInfo$CumEvents A vector of length LookInfo$NumLooks that contains the number of events at the look.

UserParam

A list of user defined parameters in East or Solara. UserParam must be supplied and contain the following named elements:

UserParam$dAlphaCtrl

Prior alpha parameter for control treatment. Equivalent to the prior number of treatment successes.

UserParam$dBetaCtrl

Prior beta parameter for control treatment. Equivalent to the prior number of treatment failures.

UserParam$dAlphaExp

Prior alpha parameter for experimental treatment. Equivalent to the prior number of treatment successes.

UserParam$dBetaExp

Prior beta parameter for experimental treatment. Equivalent to the prior number of treatment failures.

UserParam$dUpperCutoffEfficacy

A value (0,1) that specifies the upper cutoff for the efficacy check. Above this value will declare efficacy

UserParam$dLowerCutoffForFutility

A value (0,1) that specified the lower cutoff for the futility check. Below this value will declare futility.

If user variables are not specified then a Beta( 1, 1 ) prior is utilized for both standard of care and experimental.

Value

The function must return a list in the return statement of the function. The information below lists elements of the list, if the element is required or optional and a description of the return values if needed.

Decision

Required value. Integer Value with the following meaning:

Decision = 0

when No boundary, futility or efficacy is crossed

Decision = 1

when the Lower Efficacy Boundary Crossed

Decision = 2

when the Upper Efficacy Boundary Crossed

Decision = 3

when the Futility Boundary Crossed

Decision = 4

when the Equivalence Boundary Crossed

ErrorCode

Optional integer value

ErrorCode = 0

No Error

ErrorCode > 0

Non fatal error, current simulation is aborted but the next simulations will run

ErrorCode < 0

Fatal error, no further simulation will be attempted

Delta

Estimated different between experimental and standard of care

Note

When using simulation to obtain the frequentist Operating Characteristic (OC) of a Bayesian design, you should set dLowerCutoffForFutility = 0 when simulating under the null case in order to obtain the false-positive rate of the non-binding futility rule. When you set dLowerCutoffForFutility > 0, simulation will provide the OC of the binding futility rule because the rule is ALWAYS followed.

Helpful Hints: There is often info that East sends to R that are not shown in a given example. It can be very helpful to save the input objects and then load them into your R session and inspect them. This can be done with the following R code in your function.

saveRDS( SimData, "SimData.Rds") saveRDS( DesignParam, "DesignParam.Rds" ) saveRDS( LookInfo, "LookInfo.Rds" )

The above code will save each of the input objects to a file so they may be examined within R.