# Stratified KM curve plot for estimation of proportional hazards assumption violation

I am reading a paper that attempts to investigate time varying covariates in Cox proportional hazard model for breast cancer patients. I read that we can plot stratified KM curves for two groups of patients with covariate value $$x_1 = 1$$ and $$x_1 = 0$$. Or we could plot a log-minus log plot which is the log of the cumulative hazard against time and check that the two curves are parallel. Parallel curves suggest hazard ratio is constant across all times.

My question is whether there any assumptions made for the two groups of patients with covariate value $$x_1 = 0$$ and $$x_1 = 1$$. Because if one group of patients start out healthier than the other, then wouldn't that affect the hazard ratio between the two groups? Ideally the two groups of patients should be homogenous except for covariate $$x_1$$?

## 1 Answer

The article you cite is mainly focused on assessment of the proportional hazards (PH) assumption in Cox regressions.

My question is whether there any assumptions made for the two groups of patients with covariate value $$x_1 = 0$$ and $$x_1 = 1$$. Because if one group of patients start out healthier than the other, then wouldn't that affect the hazard ratio between the two groups? Ideally the two groups of patients should be homogenous except for covariate $$x_1$$?

Ideally you are correct. In general, survival curves are easiest to interpret when you control for outcome-associated covariates. How much that matters depends on the specific data and the type of plot.

If two groups differ both in the covariate of interest, $$x_1$$, and in some set of other covariates that also meet the PH assumption, then the problem might not be so big. The actual hazard ratio between the groups might be different from the hazard associated with $$x_1$$, but you still get an assessment of overall PH (if that's your primary interest). A lack of PH for the other covariates, however, could make it seem that $$x_1$$ doesn't meet PH when it, by itself, does.

That's one reason why I find plots of scaled Schoenfeld residuals over time, also described in that paper, to provide better assessments of PH. For each covariate those plots display, as a function of event time, the (inverse-variance-scaled) difference between the actual value for the case with the event and the value expected based on the entire model, thus controlling for the other covariates. The smoothed plots also suggest the functional form of any time-varying effect of that covariate, something that's essentially impossible to glean from a Kaplan-Meier or log-minus-log plot.

Even for some plots of scaled Schoenfeld residuals, however, you might need to consider covariate balance. If you have a stratified model (for example, stratified by hospital), Therneau and Grambsch note on page 141:

... scaled Schoenfeld residuals [are] based on an overall estimate of variance ... This average over the risk sets is appropriate if the variance matrix is fairly constant over those risk sets. If two strata differ substantially in their overall covariate pattern (e.g., two institutions with quite different patient populations) then this average might not be justified.

So your concern about covariate balance is wise; it just might not always matter a lot.

A warning on terminology:

As you're new to Cox modeling, watch out for an important distinction in terminology. Quoting from the article you cite:

When the HR is not constant over time, the variable is said to have a time-varying effect; for example, the effect of a treatment can be strong immediately after treatment but fades with time. This should not be confused with a time-varying covariate, which is a variable whose value is not fixed over time, such as smoking status.

The article you cite is mainly concerned with time-varying effects (that can be modeled with time-varying coefficients), not time-varying covariate values. See the R vignette on time-varying survival models for how to handle both types of time dependence.

• Thank you for the informative reply. In the case where I am modelling survival times for 2 covariates age and sex for example. Let $x_1$ be sex. Then I stratify patients based on sex, and I plot the KM survival estimates / log-minus-log plot. Suppose the mean age of Males is 60 and the mean age of females is 40, and supposing also that age obeys PH assumption, then if sex obeys PH assumption, the two curves should look "parallel" to each other? regardless of the big difference in the age between the two groups. May 20, 2021 at 1:25