TWOSAMPLESURVIVAL Statement 
The TWOSAMPLESURVIVAL statement performs power and sample size analyses for comparing two survival curves. The logrank, Gehan, and TaroneWare rank tests are supported.
Table 70.23 summarizes categories of options available in the TWOSAMPLESURVIVAL statement.
Task 
Options 

Define analysis 

Specify analysis information 

Specify effects 

Specify loss information 

Specify sample size and allocation 

Specify power 

Control sample size rounding 

Specify computational method 

Control ordering in output 
Table 70.24 summarizes the valid result parameters for different analyses in the TWOSAMPLESURVIVAL statement.
Analyses 
Solve For 
Syntax 

TEST=GEHAN 
Power 

Sample size 

TEST=LOGRANK 
Power 

Sample size 

TEST=TARONEWARE 
Power 

Sample size 

specifies the common accrual rate per group or requests a solution for the common accrual rate per group with a missing value (ACCRUALRATEPERGROUP=.). The accrual rate per group is the number of subjects in each group that enters the study per time unit during the accrual period. Use of this option implicitly specifies a balanced design. The NFRACTIONAL option is automatically enabled when the ACCRUALRATEPERGROUP= option is used. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the total accrual rate or requests a solution for the accrual rate with a missing value (ACCRUALRATETOTAL=.). The total accrual rate is the total number of subjects that enter the study per time unit during the accrual period. The NFRACTIONAL option is automatically enabled when the ACCRUALRATETOTAL= option is used. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the accrual time. Accrual is assumed to occur uniformly from time 0 to the time specified by the ACCRUALTIME= option. If the GROUPSURVIVAL= or REFSURVIVAL= option is used, then the value of the total time (the sum of accrual and followup times) must be less than or equal to the largest time in each multipoint (piecewise linear) survival curve. If the ACCRUALRATEPERGROUP=, ACCRUALRATETOTAL=, or GROUPACCRUALRATES= option is used, then the accrual time must be greater than 0. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
ACCRUALTIME=MAX can be used when each scenario in the analysis contains at least one piecewise linear survival curve (in the GROUPSURVIVAL= or REFSURVIVAL= option). It causes the accrual time to be automatically set, separately for each scenario, to the maximum possible time supported by the piecewise linear survival curve(s) in that scenario. It is not compatible with the FOLLOWUPTIME=MAX option or the TOTALTIME= option.
specifies the level of significance of the statistical test. The default is 0.05, corresponding to the usual 0.05 100% = 5% level of significance. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
For the CURVE= option,
identifies the curve in the output and with the GROUPLOSS=, GROUPSURVIVAL=, and REFSURVIVAL= options.
specifies one or more (time, survival) pairs on the curve, where the survival value denotes the probability of surviving until at least the specified time.
A singlepoint curve is interpreted as exponential, and a multipoint curve is interpreted as piecewise linear. Points can be expressed in either of two forms:
a series of time:survival pairs separated by spaces. For example:
1:0.9 2:0.7 3:0.6
a DOLIST of times enclosed in parentheses, followed by a colon (:), followed by a DOLIST of survival values enclosed in parentheses. For example:
(1 to 3 by 1):(0.9 0.7 0.6)
The DOLIST format is the same as in the DATA step.
Points can also be expressed as combinations of the two forms. For example:
1:0.9 2:0.8 (3 to 6 by 1):(0.7 0.65 0.6 0.55)
The points have the following restrictions:
The time values must be nonnegative and strictly increasing.
The survival values must be strictly decreasing.
The survival value at a time of 0 must be equal to 1.
If there is only one point, then the time must be greater than 0, and the survival value cannot be 0 or 1.
specifies the expected number of events per group—that is, deaths, whether observed or censored—during the entire study period, or requests a solution for this parameter with a missing value (EVENTSPERGROUP=.). Use of this option implicitly specifies a balanced design. The NFRACTIONAL option is automatically enabled when the EVENTSPERGROUP= option is used. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the expected total number of events—that is, deaths, whether observed or censored—during the entire study period, or requests a solution for this parameter with a missing value (EVENTSTOTAL=.). The NFRACTIONAL option is automatically enabled when the EVENTSTOTAL= option is used. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the followup time, the amount of time in the study past the accrual time. If the GROUPSURVIVAL= or REFSURVIVAL= option is used, then the value of the total time (the sum of accrual and followup times) must be less than or equal to the largest time in each multipoint (piecewise linear) survival curve. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
FOLLOWUPTIME=MAX can be used when each scenario in the analysis contains at least one piecewise linear survival curve (in the GROUPSURVIVAL= or REFSURVIVAL= option). It causes the followup time to be automatically set, separately for each scenario, to the maximum possible time supported by the piecewise linear survival curve(s) in that scenario. It is not compatible with the ACCRUALTIME=MAX option or the TOTALTIME= option.
specifies the accrual rate for each group. The groupwise accrual rates are the numbers of subjects in each group that enters the study per time unit during the accrual period. The NFRACTIONAL option is automatically enabled when the GROUPACCRUALRATES= option is used. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednumberlist.
specifies the expected number of events in each group—that is, deaths, whether observed or censored—during the entire study period. The NFRACTIONAL option is automatically enabled when the GROUPEVENTS= option is used. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednumberlist.
specifies the exponential loss survival curve for each group, by using labels specified with the CURVE= option. Loss is assumed to follow an exponential curve, indicating the expected rate of censoring (in other words, loss to followup) over time. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednamelist.
specifies the exponential hazards of the loss in each group. Loss is assumed to follow an exponential curve, indicating the expected rate of censoring (in other words, loss to followup) over time. If none of the GROUPLOSSEXPHAZARDS=, GROUPLOSS=, and GROUPMEDLOSSTIMES= options are used, the default of GROUPLOSSEXPHAZARDS=(0 0) indicates no loss to followup. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednumberlist.
specifies the median times of the loss in each group. Loss is assumed to follow an exponential curve, indicating the expected rate of censoring (in other words, loss to followup) over time. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednumberlist.
specifies the median survival times in each group. When the GROUPMEDSURVTIMES= option is used, the survival curve in each group is assumed to be exponential. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednumberlist.
specifies the two group sample sizes. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednumberlist.
specifies exponential hazard rates of the survival curve for each group. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednumberlist.
specifies the survival curve for each group, by using labels specified with the CURVE= option. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednamelist.
specifies the sample size allocation weights for the two groups. This option controls how the total sample size is divided between the two groups. Each pair of values for the two groups represents relative allocation weights. Additionally, if the NFRACTIONAL option is not used, the total sample size is restricted to be equal to a multiple of the sum of the two group weights (so that the resulting design has an integer sample size for each group while adhering exactly to the group allocation weights). Values must be integers unless the NFRACTIONAL option is used. The default value is (1 1), a balanced design with a weight of 1 for each group. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednumberlist.
specifies the hazard ratio of the second group’s survival curve to the first group’s survival curve. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
enables fractional input and output for sample sizes. This option is automatically enabled when any of the following options are used: ACCRUALRATEPERGROUP=, ACCRUALRATETOTAL=, EVENTSPERGROUP=, EVENTSTOTAL=, GROUPACCRUALRATES=, and GROUPEVENTS=. See the section Sample Size Adjustment Options for information about the ramifications of the presence (and absence) of the NFRACTIONAL option.
specifies the common sample size per group or requests a solution for the common sample size per group with a missing value (NPERGROUP=.). Use of this option implicitly specifies a balanced design. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the number of subintervals per unit time to use in internal calculations. Higher values increase computational time and memory requirements but generally lead to more accurate results. The default value is 12. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the sample size or requests a solution for the sample size with a missing value (NTOTAL=.). See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) arranges the parameters in the output according to the following order of their corresponding options:
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order in which their corresponding options are specified in the TWOSAMPLESURVIVAL statement. The OUTPUTORDER=REVERSE option arranges the parameters in the output in the reverse of the order in which their corresponding options are specified in the TWOSAMPLESURVIVAL statement.
specifies the desired power of the test or requests a solution for the power with a missing value (POWER=.). The power is expressed as a probability, a number between 0 and 1, rather than as a percentage. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the exponential hazard rate of the survival curve for the first (reference) group. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the survival curve for the first (reference) group, by using labels specified with the CURVE= option. See the section Specifying Value Lists in Analysis Statements for information about specifying the namelist.
specifies the number of sides (or tails) and the direction of the statistical test or confidence interval. See the section Specifying Value Lists in Analysis Statements for information about specifying the keywordlist. Valid keywords and their interpretation are as follows:
onesided with alternative hypothesis in same direction as effect
twosided
upper onesided with the alternative hypothesis favoring better survival in the second group
lower onesided with the alternative hypothesis favoring better survival in the first (reference) group
The default value is 2.
specifies the statistical analysis. TEST=GEHAN specifies the Gehan rank test. TEST=LOGRANK (the default) specifies the logrank test. TEST=TARONEWARE specifies the TaroneWare rank test.
specifies the total time, which is equal to the sum of accrual and followup times. If the GROUPSURVIVAL= or REFSURVIVAL= option is used, then the value of the total time must be less than or equal to the largest time in each multipoint (piecewise linear) survival curve. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
TOTALTIME=MAX can be used when each scenario in the analysis contains at least one piecewise linear survival curve (in the GROUPSURVIVAL= or REFSURVIVAL= option). It causes the total time to be automatically set, separately for each scenario, to the maximum possible time supported by the piecewise linear survival curve(s) in that scenario. It is not compatible with the ACCRUALTIME=MAX option or the FOLLOWUPTIME=MAX option.
To specify the survival curves, choose one of the following parameterizations:
arbitrary piecewise linear or exponential curves (by using the CURVE= and GROUPSURVIVAL= options)
curves with proportional hazards (by using the CURVE=, REFSURVIVAL=, and HAZARDRATIO= options)
exponential curves, by using one of the following parameterizations:
median survival times (by using the GROUPMEDSURVTIMES= option)
the hazard ratio and the hazard of the reference curve (by using the HAZARDRATIO= and REFSURVEXPHAZARD= options)
the individual hazards (by using the GROUPSURVEXPHAZARDS= option)
To specify the study time, use any two of the following three options:
accrual time (by using the ACCRUALTIME= option)
followup time (by using the FOLLOWUPTIME= option)
total time, the sum of accrual and followup times (by using the TOTALTIME= option)
To specify the sample size and allocation, choose one of the following parameterizations:
sample size per group in a balanced design (by using the NPERGROUP= option)
accrual rate per group in a balanced design (by using the ACCRUALRATEPERGROUP= option)
expected number of events per group in a balanced design (by using the EVENTSPERGROUP= option)
total sample size and allocation weights (by using the NTOTAL= and GROUPWEIGHTS= options)
total accrual rate and allocation weights (by using the ACCRUALRATETOTAL= and GROUPWEIGHTS= options)
expected total number of events and allocation weights (by using the EVENTSTOTAL= and GROUPWEIGHTS= options)
individual group sample sizes (by using the GROUPNS= option)
individual group accrual rates (by using the GROUPACCRUALRATES= option)
expected numbers of events in each group (by using the GROUPEVENTS= option)
The values of parameters that involve expected number of events or accrual rate are converted internally to the analogous sample size parameterization (that is, the NPERGROUP=, NTOTAL=, or GROUPNS= option) for the purpose of sample size adjustments according to the presence or absence of the NFRACTIONAL option.
To specify the exponential loss curves, choose one of the following parameterizations:
a point on the loss curve of each group (by using the CURVE= and GROUPLOSS= options)
median loss times (by using the GROUPMEDLOSSTIMES= option)
the individual loss hazards (by using the GROUPLOSSEXPHAZARDS= option)
This section summarizes the syntax for the common analyses supported in the TWOSAMPLESURVIVAL statement.
You can use the NPERGROUP= option in a balanced design and specify piecewise linear or exponential survival curves by using the CURVE= and GROUPSURVIVAL= options, as in the following statements. Default values for the SIDES=, ALPHA=, NSUBINTERVAL=, and GROUPLOSSEXPHAZARDS= options specify a twosided test with a significance level of 0.05, an assumption of no loss to followup, and the use of 12 subintervals per unit time in computations.
proc power; twosamplesurvival test=logrank curve("Control") = (1 2 3):(0.8 0.7 0.6) curve("Treatment") = (5):(.6) groupsurvival = "Control"  "Treatment" accrualtime = 2 followuptime = 1 npergroup = 50 power = .; run;
In the preceding example, the "Control" curve is piecewise linear (since it has more than one point), and the "Treatment" curve is exponential (since it has only one point).
You can also specify an unbalanced design by using the NTOTAL= and GROUPWEIGHTS= options and specify piecewise linear or exponential survival curves with proportional hazards by using the CURVE=, REFSURVIVAL=, and HAZARDRATIO= options:
proc power; twosamplesurvival test=logrank curve("Control") = (1 2 3):(0.8 0.7 0.6) refsurvival = "Control" hazardratio = 1.5 accrualtime = 2 followuptime = 1 groupweights = (1 2) ntotal = . power = 0.8; run;
Instead of computing sample size, you can compute the accrual rate by using the ACCRUALRATETOTAL= option:
proc power; twosamplesurvival test=logrank curve("Control") = (1 2 3):(0.8 0.7 0.6) refsurvival = "Control" hazardratio = 1.5 accrualtime = 2 followuptime = 1 groupweights = (1 2) accrualratetotal = . power = 0.8; run;
or the expected number of events by using the EVENTSTOTAL= option:
proc power; twosamplesurvival test=logrank curve("Control") = (1 2 3):(0.8 0.7 0.6) refsurvival = "Control" hazardratio = 1.5 accrualtime = 2 followuptime = 1 groupweights = (1 2) eventstotal = . power = 0.8; run;
You can also specify sample sizes with the GROUPNS= option and specify exponential survival curves in terms of median survival times:
proc power; twosamplesurvival test=logrank groupmedsurvtimes = (16 22) accrualtime = 6 totaltime = 18 groupns = 40  60 power = .; run;
You can also specify exponential survival curves in terms of the hazard ratio and reference hazard. The default value of the GROUPWEIGHTS= option specifies a balanced design.
proc power; twosamplesurvival test=logrank hazardratio = 1.2 refsurvexphazard = 0.7 accrualtime = 2 totaltime = 4 ntotal = 100 power = .; run;
You can also specify exponential survival curves in terms of the individual hazards, as in the following statements:
proc power; twosamplesurvival test=logrank groupsurvexphazards = 0.7  0.84 accrualtime = 2 totaltime = 4 ntotal = . power = 0.9; run;
In addition to the logrank test, you can also specify the Gehan tank test, as in the following statements. Default values for the SIDES=, ALPHA=, NSUBINTERVAL=, and GROUPLOSSEXPHAZARDS= options specify a twosided test with a significance level of 0.05, an assumption of no loss to followup, and the use of 12 subintervals per unit time in computations.
proc power; twosamplesurvival test=gehan groupmedsurvtimes = 5  7 accrualtime = 3 totaltime = 6 npergroup = . power = 0.8; run;
You can also specify the TaroneWare tank test, as in the following statements. Default values for the SIDES=, ALPHA=, NSUBINTERVAL=, and GROUPLOSSEXPHAZARDS= options specify a twosided test with a significance level of 0.05, an assumption of no loss to followup, and the use of 12 subintervals per unit time in computations.
proc power; twosamplesurvival test=taroneware groupmedsurvtimes = 5  7 accrualtime = 3 totaltime = 6 npergroup = 100 power = .; run;