• Laura Whiting

Survival Curve with Lines to Pinpoint an Observation

This is a survival curve graph with confidence interval shading and two lines to pinpoint a particular observation on the graph.

The following commands are used to create this graph:

For this graph, the first line starting with twoway uses a shaded-area graph to create the confidence intervals. The second line, starting with line is the survival curve. The third line, starting with pci creates the two lines used to pinpoint a single observation. The fourth line starting with scheme controls the colour, removes the legend and gives the X-axis a title. The fifth line, starting with ylabel sets the Y-axis and adds the value label to the horizontal pinpoint line.


To learn more about different Stata graphs and how to use them, check out the book A Visual Guide to Stata Graphics at our bookstore.

5 views

© 2020 by Survey Design and Analysis Services. 

  • LinkedIn
  • Facebook
  • Twitter
  • YouTube