Announcement

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

  • How can I Graph Observed Cumulative Faiulre Curve of the Event of Interest in Discrete-time Survival Analysis in Stata?

    Hello,
    I am new to discrete-time survival analysis. I am trying to graph the following curves (and/0r by gender):

    1) observed cumulative failure curve of the event of interest.
    2) observed cumulative survival curve of the event of interest.
    3) observed survival curve of the event of interest

    The dataset is here:
    u https://stats.idre.ucla.edu/stat/sta...mathdropout_pp, clear
    keep id female period event
    bys id: gen time=_N
    bys period female: egen p = mean(event)


    I know how to graph the observed hazard curve for the event of interest in Stata.
    twoway (line p period if female==0)(line logitp period if female==1),title("Observed sample hazard functions") xtitle("Term") ytitle("hazard") legend(pos(5) ring(0) col(1) label(1 "male") label(2 "female"))

    I have no idea about how to acheive my goal above.
    By the way, I don't want to use life table results to graph them in Excel.
    Thank you for your help!
    Last edited by smith Jason; 17 Apr 2022, 11:56.

  • #2

    use https://stats.idre.ucla.edu/stat/sta...mathdropout_pp, clear
    This is the public address to access the data in UCLA website.
    Last edited by smith Jason; 17 Apr 2022, 12:03.

    Comment


    • #3
      Sorry again. The website doesn't allow to directly paste the link and I have to upload the dataset used in my post here.
      Thank you!
      Attached Files

      Comment


      • #4
        Can anybody help? Thank you!

        Comment

        Working...
        X