Fleming, TR and Harrington, DP (1991). *Counting Processes and Survival Analysis.* Wiley.

This two-arm survival program assumes both piece-wise exponential survival curves and piece-wise constant accrual over unit intervals.

The formulas are based on the large sample distribution of logrank test statistic, with non-centrality parameter calculated using piecewise uniform accrual over time, no loss to follow-up, and piece-wise exponentially distributed death times. The current program uses an approximation based on the expected number at risk at the midpoints of each interval. Therefore, increasing the number of accrual and follow-up intervals improves the performance of the approximation. In general this program should be used for approximate calculations then followed with appropriate simulation studies for more accurate properties.

The default is to estimate the sample size, using a fixed hazard ratio for all intervals. The user is prompted for the input listed below including the width of each interval and the number of accrual intervals and number of follow-up intervals. Note, because a patient can be followed up to total number of accrual (# accrual) and follow-up (# follow) intervals the hazard rates need to be filled in for a total of # accrual + # follow intervals. All input must be in terms of the same time units.

The user is prompted for values to the following items. For items that have initial default values set, the values are given in parentheses.

**Calculation**: Sample Size or Power (*Sample Size*)**Sided**: 1-Sided or 2-Sided Test (*1-Sized*)**Alternative Effect Specification**: Simple Hazard Ratio or Varying Hazard Ratio (*Simple Hazard Ratio*)**The Proportion of Patients in the Standard Group**:*\(\frac{n1}{n1 + n2}\)*(*.50*)**Alpha**: The Significance Level,*\(\alpha\)*(*.05*)**Power**:*\(\beta\)*(*.90*). This applies when type calculation = Sample Size.**Total Accrual**: This applies when Type Calculation = Power**Width of Each Interval**: (*1*)**Number of Accrual Intervals**: (*1*)**Number of Follow-up Intervals**: (*0*)**Hazard Ratio**: (*1.5*). This applies when Alternative Effect Specification = Simple Hazard Ratio.**Proportion Accrual at End of the Interval**: The accrual table is defaulted to have an equal proportion of patients accrued in each interval. In the case of multiple accrual intervals and uneven accrual between intervals, the proportion of patients accrued by the end of each interval must be updated.**Hazard Rate, Std.**: The hazard rate for each interval of time post-randomization must be entered in the Hazard Rates table.**Hazard Ratio, Std. to Exp.**: This applies when Alternative Effect Specification = Varying Hazard Ratios. The hazard ratio specifying the treatment effect associated with each interval of time post-randomization must be entered in the Hazard Rates table.

- Power:
*\(\beta\)*This applies when type calculation = Power - Total Accrual: This applies when Type Calculation = Sample Size

The program is written in *JavaScript*.