Statistical Power for Cox model
Ensure optimal power or sample size using power analysis. Power for Cox regression is available in Excel using the XLSTAT statistical software.
Statistical Power for Cox model
XLSTAT-Life offers a tool to apply the proportional hazards ratio Cox regression model. XLSTAT-Power estimates the power or calculates the necessary number of observations associated with this model. 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 up front, but based on other parameters of the model we can try to minimize it. The power of a test is calculated as 1-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. The XLSTAT-Power module 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.
The Cox model is based on the hazard function which is the probability that an individual will experience an event (for example, death) within a small time interval, given that the individual has survived up to the beginning of the interval. It can therefore be interpreted as the risk of dying at time t. The hazard function (denoted by l(t,X)) can be estimated using the following equation: λ(t,X) = λ0 (t) exp(β1X1 + … + (βpXp) The first term depends only on time and the second one depends on X. We are only interested by the second term. If all βi are equal to zero then there is no hazard factor. The goal of the Cox model is to focus on the relations between the βis and the hazard function. The test used in XLSTAT-Power is based on the null hypothesis that the β1 coefficient is equal to 0. That means that the X1 covariate is not a hazard factor.
The hypothesis to be tested is:
- H0: β1 = 0
- Ha: βi ≠ 0
Power is computed using an approximation which depends on the normal distribution. Other parameters used in this approximation are: the event rate, which is the proportion of uncensored individuals, the standard deviation of X1, the expected value of β1 known as B(log(hazard ratio)) and the R² obtained with the regression between X1 and the other covariates included in the Cox model.
Calculating sample size for the Cox model taking statistical power into account
To calculate the number of observations required, XLSTAT uses an algorithm that searches for the root of a function. It is called the Van Wijngaarden-Dekker-Brent algorithm (Brent, 1973). This algorithm is adapted to the case where the derivatives of the function are not known. It tries to find the root of:
power (N) - expected_power
We then obtain the size N such that the test has a power as close as possible to the desired power.
Calculating B for the Cox model
The B(log(hazard ratio)) is an estimation of the coefficient β1 of the following equation: log(λ(t|X) / λ0 (t)) = β1X1 + … + βkXk β1 is the change in logarithm of the hazard ratio when X1 is incremented of one unit (all other explanatory variables remaining constant). We can use the hazard ratio instead of the log. For a hazard ratio of 2, we will have B = ln(2) = 0.693.
analyze your data with xlstat