Compute sample size and power for a Cox regression in Excel
This tutorial explains how to calculate the sample size and power for a Cox regression with Excel using XLSTAT.
What is the power of a statistical test?
XLSTAT offers you a tool to apply the proportional hazards ratio Cox regression model. You may need to estimate the power or calculate the necessary number of observations before running a Cox model.
Actually, when testing a hypothesis using a statistical test, there are several decisions to take:
The null hypothesis H0 and the alternative hypothesis Ha.
The statistical test to use.
The type I error also known as alpha. It occurs when one rejects the null hypothesis when it is true. It is set a priori for each test and is 5%.
The type II error or beta is less studied but is of great importance. In fact, it represents the probability that one does not reject the null hypothesis when it is false. We cannot fix it upfront, but based on other parameters of the model we can try to minimize it. The power of a test is calculated as 1-beta1−beta and represents the probability that we reject the null hypothesis when it is false.
We therefore wish to maximize the power of the test. XLSTAT calculates the power (and beta) when other parameters are known. For a given power, it also allows to calculate the sample size that is necessary to reach that power.
The statistical power calculations are usually done before the experiment is conducted. The main application of power calculations is to estimate the number of observations necessary to properly conduct an experiment.
Goal of this tutorial
We want to determine the impact of several explanatory variables on the survival time of patients with ovarian cancer.
We are therefore going to find out what is the right sample size to carry out this study and obtain a test power of 0.9. For this study, the desired proportion of uncensored individuals is 40%.
Setting up the sample size calculation for a Cox regression model
Once XLSTAT has been launched, click on the Power icon and choose Cox model.
Once the button is clicked, the dialog box pops up.
You must then choose the objective Find the sample size, then enter the various desired parameters including the event rate at 0.4.
The alpha is 0.05. The desired power is 0.9.
In the Chart tab, the simulation plot option is activated and the size of sample 1 will be represented on the vertical axis and the power on the horizontal axis.
The power varies between 0.8 and 0.95 in intervals of 0.01.
Once you click on the OK button, the calculations are done and then the results are displayed.
Interpret the results of sample size calculations for a Cox regression model
The first table gathers the parameters used as input.
The second table gathers the results of the calculation as well as an interpretation of the results.
We see that 10 individuals per sample are sufficient to obtain a power as close as possible to 0.9.
The following table gathers the calculations obtained for each value of the power between 0.8 and 0.95.
The simulation plot shows the evolution of the sample size as a function of the power. We see that for a power of 0.8, 8 individuals are sufficient per sample and that for a power of 0.95 we arrive at 13 individuals.
Was this article useful?