Hi all,

I've come across some unexpected behaviour which I'd appreciate comments on. I'm using Stata 15.1 on Windows 7.

Code:
webuse drug2, clear

// sts graph without risktable: successful
sts graph, by(drug) saving(testgraph1.gph)

// sts graph without risktable: exists with error r(602)
sts graph, by(drug) risktable saving(testgraph2.gph)

It appears that the code for the "risktable" subroutine causes "sts graph" to attempt to save the graph twice, the second such attempt failing as would be expected.

This can of course be worked around by saving the graph in a separate command line; but to me this is nevertheless a bug.

Thanks,

David.