**stpower cox**
estimates required sample size (given power and effect size) or power (given sample size and effect size)
or the minimal detectable effect size (given power and sample size) for
models with multiple covariates.

**stpower logrank** estimates required sample size (given power and effect size) or power
(given sample size and effect size) or the minimal detectable effect size (given power
and sample size) for studies comparing survivor functions of two groups
by using the log-rank test. Both the Freedman (1982) and the Schoenfeld
(1981) methods are provided.

**stpower
exponential** estimates sample size (given power and effect size) or power (given sample
size and effect size) for parametric tests of the difference between hazards or log
hazards of two groups under the assumption of exponential survivor
functions. Both the Lachin and Foulkes (1986) and
Rubinstein, Gail, and Santner (1981) methods are provided.

**stpower** allows automated production of customizable
tables and have options to assist with creating graphs of power curves.

Below are several examples demonstrating some of **stpower**’s
features:

*Study design*

Consider a survival study comparing two treatments, a standard treatment and
a new, experimental treatment. The survival probability in the control group
at the end of the study is expected to be approximately 0.7. We need to
estimate the sample size required to detect an increase in survival of the
experimental group from 0.7 to 0.8 at the end of the study with power of 80%,
85%, and 90%, using a two-sided log-rank test at the 5% significance level.
We use stpower logrank to obtain the required
sample sizes:

Power N N1 N2 E S1 S2 | ||

.8 592 296 296 148 .7 .8 | ||

.85 678 339 339 170 .7 .8 | ||

.9 794 397 397 200 .7 .8 | ||

HR Alpha* | ||

.625622 .05 | ||

.625622 .05 | ||

.625622 .05 | ||

*Results*

The table reports estimates of the required number of events and sample
sizes in the study for three powers given other study parameters. The last
row of the table indicates that we need 200 events to be observed in the
study (and a sample size of 794 to observe the 200 events in the study)
for our log-rank test to have a power of 90%. The increase
in survival from 0.7 to 0.8 is equivalent to a hazard ratio of .626 of
the experimental to the control group, as shown in the second-to-last
column in the table.

If our sample size is predetermined, we may want to find out the smallest
effect size or increase in survival expressed as a hazard ratio that can be
detected with a given level of power. We can use
**stpower**
to produce power curves as a function of the hazard ratio for several sample
sizes.

Suppose that we want to produce power curves as a function of the effect size for sample sizes of 100, 250, and 500 for the study we considered in the first example.

Power N N1 N2 E S1 S2 | ||

.917551 100 50 50 17 .7 .964961 | ||

.999573 250 125 125 42 .7 .964961 | ||

1 500 250 250 84 .7 .964961 | ||

.909637 100 50 50 17 .7 .961525 | ||

.999434 250 125 125 43 .7 .961525 |

.071075 250 125 125 72 .7 .72801 | ||

.103117 500 250 250 143 .7 .72801 | ||

.046687 100 50 50 29 .7 .725418 | ||

.065023 250 125 125 72 .7 .725418 | ||

.091897 500 250 250 144 .7 .725418 | ||

HR Alpha* | ||

.1 .05 | ||

.1 .05 | ||

.1 .05 | ||

.11 .05 | ||

.11 .05 |

.89 .05 | ||

.89 .05 | ||

.9 .05 | ||

.9 .05 | ||

.9 .05 | ||

Powers are computed for each combination of sample-size and hazard-ratio values.

stpower also allows you to build your own customized tables. You can choose what to display in a table from a list of results available.

For example, if you prefer to see the probability of a type II error rather than power, and the proportion of subjects in the control group rather than group-sample sizes, reported by default, you can type

Beta N E P1 HR S1 S2 | ||

.2 592 148 .5 .625622 .7 .8 | ||

.15 678 170 .5 .625622 .7 .8 | ||

.1 794 200 .5 .625622 .7 .8 | ||

Alpha* | ||

.05 | ||

.05 | ||

.05 | ||

to obtain the table with requested columns displayed in the same order you specified.

Of course, all the above can be done using dialog boxes instead of the command line.

- Freedman, L. S. 1982.
- Tables of the number of patients required in clinical trials using
the logrank test.
*Statistics in Medicine*1: 121–129.

- Lachin, J. M., and M. A. Foulkes. 1986.
- Evaluation of sample size and power for analysis of survival with
allowance for nonuniform patient entry, losses to follow-up,
noncompliance, and stratification.
*Biometrics*42: 507–519.

- Rubinstein, L. V., M. H. Gail, and T. J. Santner. 1981.
- Planning the duration of a comparative clinical trial with loss to
follow-up and a period of continued observation.
*Journal of Chronic Diseases*34: 469–479.

- Schoenfeld, D. 1981.
- The asymptotic properties of nonparametric tests for comparing
survival distributions.
*Biometrika*68: 316–319.