# Survival analysis with multiple factors

I want to do survival analysis in a situation where I expect the survival time depends on two factors:

• Environment. Each person is in one of three environments, $E_1,E_2,E_3$. I expect that the survival time for people in $E_3$ will generally be much longer than those in $E_2$, whose survival time will generally be much longer than those in $E_1$.

• Treatment. Each person is in either the control group (no treatment) or experimental group (they are given the treatment/intervention that we're trying to evaluate).

Both environment and treatment can be fully controlled by the experimenter: they're independent variables. In my experimental design, I have $3 \times 2 = 6$ conditions, one for each combination; each person was randomly assigned to one of the 6 conditions, and then I measured their survival time. My data is right-censored (at the same threshold for all people and all conditions).

I want to test whether the intervention increased survival time. My null hypothesis is that the survival time depends only on environment. The alternative hypothesis is that the survival time depends on both factors and specifically, the intervention increases the survival time in all 3 environments.

How can I test this? Is there a statistical hypothesis test I could use for this purpose?

Some approaches I've considered that don't seem well-suited:

• If I only had one environment (2 conditions) and didn't have right-censoring, I could use the Mann-Whitney U (Wilcoxon rank sum). However, my data has right-censoring and more than 2 conditions.

• If my data was normal and not right-censored, maybe ANOVA would be useful. However, my data has right-censoring and doesn't look normal.

• Because there are 6 groups, I considered using the Kruskal-Wallis test. However, Kruskal-Wallis doesn't handle right-censoring. Also, I have the impression Kruskal-Wallis doesn't really do what I want: it sounds like it compares the null to an alternate hypothesis that at least one of the 6 groups has a higher survival time than the others, rather than that treatment systematically increases survival times in all 3 environments.

• If I had only 2 conditions (i.e., only one environment), I could use the log-rank test. It sounds like it would be perfect, because it handles right-censored data and is non-parametric. However, I have more than 2 groups, so the log-rank test doesn't seem applicable here.

• I could ignore the environment, and aggregate the data from the 3 experimental groups into a single group and aggregate the data from the 3 treatment groups into a single group, and then apply the log-rank test. However, I expect this might lose a lot of power, because the environment has a big effect on survival time.

Is there a better approach to this?

Perhaps one could apply log-rank to compare $E_1$-Control to $E_1$-Experimental and get a p-value, say $p_1$; compare $E_2$-Control to $E_2$-Experimental to get a p-value, $p_2$; and similarly a p-value $p_3$ for comparing $E_3$-Control vs $E_3$-Experimental; then multiply these three p-values to get a single number $p_1 p_2 p_3$, which is used as a p-value for the null hypothesis overall. Does this make sense? Is this a sound method?

• Is there some reason why you can't use a Cox proportional hazards survival model?
– EdM
May 6, 2016 at 13:56

For a start, you might read the series of 4 articles from the British Journal of Cancer in 2003, which are freely available from PubMed Central (Part I, Part II, Part III, and Part IV). The base distribution of R contains the survival package, with both the fundamental tools and some useful vignettes that demonstrate how to use them. I expect that all statistical software packages support Cox regressions. There also are many additional web resources for further study.