# 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 H
_{0}and the alternative hypothesis H_{a}. - 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(β_{1}X_{1} + … + (β_{p}X_{p}) 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 β_{i}s 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 X_{1} covariate is not a hazard factor.

The hypothesis to be tested is:

- H
_{0}: β_{1}= 0 - H
_{a}: β_{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 X_{1}, the expected value of β_{1} known as B(log(hazard ratio)) and the R² obtained with the regression between X_{1} 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)}) = β_{1}X_{1} + … + β_{k}X_{k} β_{1} is the change in logarithm of the hazard ratio when X_{1} 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

Included in

Related features