Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using distplot to generate a reverse cumulative distribution curve

    Hello, I am using the user-written command "distplot" from Nick Cox (Stata Journal) in Stata/SE for Mac 13.1.

    I would like to create a reverse cumulative distribution curve to display the proportion of participants (y-axis) with values greater than or equal to values of the outcome (x-axis). For example, I would like something similar to the following:

    sysuse auto
    distplot turn if rep78==2, reverse(ge) recast(line)

    However, I would like the plot to display as a true step function, so that the lines connecting the proportions are horizontal (similar to a survival curve).

    Is there a straightforward way to do this?

    Thank you,
    Nicole

  • #2
    Use the connect(J) option.

    Comment


    • #3
      That works perfectly. Thank you, Nick.

      Comment

      Working...
      X