# Cox model regression - interpretation of survival graph

I fitted a Cox model and plotted that kaplan-Meier curve with a library survminer and survival in R. I got two variable "risk factor present" vs "risk factor absent". The max time recorded in cases with "risk factor present" is 1350 vs 4200 for case with "risk factor absent" (HR: 2.3 [1.4 - 5.0] p = 0.02). I got the following graph:

I think that the end of the line for "risk factor present" is a bit abrupt. I want to illustrate that the HR is higher for cases with "risk factor present". Is this graph ok so or should there be any kind of smoother stepping down of the line?

EDIT

I find this interesting article where I found a useful (to me at least) information about how to integrate the "bits of steps and straight line" integrate with the percentage on the y axis. It says: "There are two probabilities which can be confusing. There is a cumulative probability and an interval probability. The cumulative probability defines the probability at the beginning and throughout the interval. This is graphed on the Y-axis of the curve. The interval survival rate (or probability) defines the probability of surviving past the interval, i.e. still surviving after the interval and beginning the next. The first intervals characteristically begin at zero time and end just prior tot the first event. Cumulative probabilities for an interval are calculated by multiplying the interval survival rates up to that interval. The Y-axis in the curve only relates to the cumulative probability of the interval but does not tell us how many subjects were in the numerator the denominator for each interval". I guess this cumulative probability corresponds to the the "estimator" of the wiki page of kaplan meier pointed by @EdM:

$$\hat{S}(t) = \prod_{i: t_{t} \leq t }\Big(1 - \frac{d_{i}}{n_{i}} \Big)$$

where $$t_{i}$$ a time when at least one event happened, $$d_{i}$$ the number of events that happened at time $$t_{i}$$ and $$n_{i}$$ the individuals known to survive (have not yet had an event or been censored) at time $$t_{i}$$

Please let me know if this doesn't make sense

This type of behavior of survival curves is to be expected when there are few cases at risk at the end. At 1000 days there were only 15 cases left with the risk factor present. Some of them had events or were censored shortly thereafter so that there were evidently only 1 or 2 still at risk at about 1400 days, and all still at risk in that group had events at that time. Thus none with the risk factor present survived beyond that point in time; the graph thus drops immediately to 0, consistent with the cases at risk shown for the later times in the table under the plot.

So as @Fer Salcedo suggests in another answer, this is quite a reasonable graph even though it it might look a bit ugly at first. The abrupt drop just means that there weren't many cases still at risk at that time.

As readers will expect these to be empirical graphs of actual event and censoring times, you should not try to smooth the curve. You could consider truncating the plot at some earlier time (e.g., just show up to 3 years) if that is the main time course of interest for this particular situation.

• Thank you very much for your answers @EdM and FerSalcedo. There is still a point though that I have trouble to understand. There are 48 cases with risk factors. There are 15, 10 and 7 cases still alive at 1000, 1100 and 1200 days respectively. How is the percentage of the y axis calculated? Isn't it the percentage respect to the initial number (i.e.: 15/48, 10/48, and 7/48 respectively). And wouldn't it be more appropriate to decrease the size of each part of the line which is straight so that there would be more "steps" (or how is the length of each step calculated?)
– ecjb
Oct 4, 2018 at 5:28
• @ecjb cases lost to follow up (censored) provide no information about their event times except that they occurred after the censoring times (crosses on the plots in your question). So in this Kaplan-Meier plot, cases are removed from the denominator after their censoring times. The fraction of the drop toward zero survival at each event time is the fraction of cases still at risk at that time that had events at that time. For example, with 15 cases at risk at t=1000, that event is a drop of 1/15 of the way to 0, not 1/48 of the way.
– EdM
Oct 4, 2018 at 8:46

The graph is quite possible, its say that "risk factor present" cohort did not survival at ~1500 days. Did you view the life table this cohort?