Announcement

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

  • #16
    Yes, it's still doable. You don't have to have panel data to use -reshape-.

    Code:
    gen long obs_no = _n
    reshape wide survivor, i(obs_no) j(reason)
    graph twoway connected survivor* time, connect(stairstep) xlabel(15(5)35) msym(i)
    Note: In your example data, there are only three values of reason, so only three curves result. Also, for two of those values of reason, there aren't enough data points to form a stairstep graph, so the result looks like a straight-line connect instead. Presumably in your full data you will not encounter these problems.

    Comment

    Working...
    X