Spending functions are used to set boundaries for group sequentialdesigns. Using the spending function approach to design offers a naturalway to provide interim testing boundaries when unplanned interimanalyses are added or when the timing of an interim analysis changes.Many standard and investigational spending functions are provided in thegsDesign package. These offer a great deal of flexibility in setting upstopping boundaries for a design.
Spending functions have three arguments and return an object of typespendfn. Thesummary() function forspendfn objects provides a brief textual summary of aspending function or boundary used for a design. Normally a spendingfunction will be passed togsDesign() in the parametersfu for the upper bound andsfl for the lowerbound to specify a spending function family for a design. In this case,the user does not need to know the calling sequence — only how tospecify the parameter(s) for the spending function. The calling sequenceis useful when the user wishes to plot a spending function asdemonstrated below in examples. In addition to using supplied spendingfunctions, a user can write code for a spending function. Seeexamples.
SeespendingFunction() for the input and outputspecification of spending functions. It also contains two code examplesshowing how to use an implemented spending function and create newspending functions. For more detailed examples, see thespendingfunctions chapter in the gsDesign technical manual.