In a recent post, I discussed some statistical consultancy I was involved with. I was quite proud of the nice ggplot2 graphics I had created. The graphs nicely summarised the main points of the paper:

I’ve just had the proofs from the journal, and next to the graphs there is the following note:

It is not usual BJS style to include 95 per cent confidence intervals in K-M

curves. Could you please re-draw Figs 1 & 2 omitting these and INCLUDING ALL

FOUR CURVES IN A SINGLE GRAPH. (If you wish to include 95% c.i., the data could

be produced in tabular form instead.)

They have a policy of **not** including CI on graphs? So instead of a single nice graphic, they now want a graph and a table with (at least) 9 rows and 5 columns?

### Like this:

Like Loading...

*Related*

:(

Comment by Tal Galili — January 13, 2011 @ 10:21 pm

Awesome figure. Could you share the code for this plot?

Comment by scott chamberlain — January 13, 2011 @ 10:21 pm

The tricky bit was creating a data frame of information from the R survival package. Once you have the data frame, ggplot2 does the rest. Unfortunately, the code I have is incredibly hacky and not really of use to anyone. I tried to make it more general, but I kept running into special cases. However, the comment by Jens in a previous post points to some slightly nicer R code that does something similar.

Comment by csgillespie — January 14, 2011 @ 2:50 pm

Bleh! I’m sorry. Asking for tables instead of graphs is horrible. But maybe there’s something to be said for putting all of the curves (without the conf. intervals) in one graph for easier comparison?

Comment by DavidC — January 13, 2011 @ 10:41 pm

I take your point, but

1. I think it’s fairly easy to see that the top left plot is fundamentally different from the other three.

2. The CIs aren’t that similar across treatments.

3. I find that when you have four lines in a B & W plot, trying to tell the difference between dots and dashes becomes tricky.

Comment by csgillespie — January 14, 2011 @ 2:53 pm

The graph you produced is nice but incomplete. Given the style requirements mentioned by BJS, I would suggest the following:

1) Check some back issues of this journal to see what kind of K-M curves were published in the past by this journal;

2) Re-create the graph as suggested by BJS but supplement it with a table listed underneath the graph which would show the following information:

a) Column 1: Years of follow-up;

b) Column 2: Cumulative survival at a specific time point (95% CI);

c) Column 3: Number of patients at risk;

d) Column 4: Number of “events”.

For Column 2 of your table, you would have 4 different sub-columns (one for each of the four sub-groups you are interested in). Each of these sub-columns would list information corresponding to a particular number of years of follow-up in the format, say, 0.898 (0.892, 0.904). (You could use 2 significant digits if space becomes an issue.)

For Column 3 of your table, you would also have 4 different sub-columns (one for each of the four sub-groups you are interested in).

For each particular number of years of follow-up, you would list the number of patients of risk in each sub-group.

For Column 4 of your table, you would list the number of “events” of interest in your case.

Note that, as the number of years of follow-up increase, some cells in your table would be blank owing to the inability to compute survival probabilities.

If you use a small font, you should be able to fit this table underneath your graph, ending up with a graph – table hybrid.

On the graph itself, you could add a line of text like “Log-Rank Test P-value: 0.023″, with 0.023 to be replaced by your own P-value (if you performed such a test). In addition, the 4 survival curves would have to use different line types. A legend explaining what each line type corresponds to would be in order.

Finally, an overall title for your graph would be nice (e.g.: Cumulative Survival by Group). For the x-axis, I would favour a label like: “Time from … (Years)”. For the y-axis, a label like “Probability of Survival” would be nice.

As you can see, sometimes a lot more customization is required to ensure that a graph conveys the desired information. The requirements of BJS may seem stringent, but I think they are quite reasonable and would enable the readers of your paper to “read” your graph correctly.

Comment by Isabella Ghement — January 13, 2011 @ 11:35 pm

Hi Isabella. Thanks for your comments, they have been helpful. I’ll try and go through them:

1. Yes, I checked the back issues.

2. Unfortunately, the journal specify what type of table should be put under the plot (essentially what you have but without the CI). So the confidence intervals would have to appear in a separate table. In fact, I have another similar plot, so that would mean two additional tables.

* Personally I try to avoid using a “small font”. If information is worth putting in, it should have the same font as other details. I realise that I could just go down to pt 11 or even 10 though.

* I find using different line types for four curves rather tricky to read. Three line types are OK, but four is pushing it.

* I take your point about axis labels – thanks.

* Also, one of the referees and the editor both commented that they found the graphs very easy to read.

Comment by csgillespie — January 14, 2011 @ 3:05 pm