Announcement

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

  • Data Structure for Anderson-Gill extension of Cox Regression

    Hi All,

    I am attempting to structure my data and generate variables to run an Anderson-Gill extension of Cox Regression. I am being guided by the STATA technical bulletin from 1999 (see PDF here: https://www.researchgate.net/publica...ata_With_Stata) in addition to some other resources. The data structure guidance is coming from this PPT presentation (https://www.stata.com/meeting/italy1...8_Ghilotti.pdf) on slide 5. For your reference, I have screenshot the slides below.


    Click image for larger version

Name:	2.PNG
Views:	1
Size:	57.3 KB
ID:	1523635



    Click image for larger version

Name:	3.PNG
Views:	1
Size:	33.5 KB
ID:	1523636




    I am attempting to model hazard of emergency department repeat use continuously (i.e. can have multiple 'failures,' not just one readmission or repeat ED use). The data is set up as panel data currently. Each patient has varying amounts of time (i.e. how many visits per year) in the data set, and varying numbers of visits. I have the following variables: patient ID (long), ED admit date (date), indicator of if a visit occurred within 14 days of another ED visit (er_ff_visit), and a rank of ED visits (ff_rank). Here is a dataex of the variables:

    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long pid float(er_admit_date er_ff_visit ff_rank)
    62 19908 0 1
    62 19915 1 2
    62 20196 0 3
    62 20205 1 4
    62 20512 0 5


    I am trying (unsuccessfully) to create T_Start, T_End, and Interval per the powerpoint. Specifically:

    T-Start: Needs to begin at 0 at first ED visit when ff_rank==1. At the first visit where er_ff_visit==1 (i.e. first repeat ED visit), T-Start needs to be the days between the first ED visit and the first repeat ED visit (i.e. 36 or 112 days). At each subsequent repeat ED visit (i.e. er_ff_visit==1), T-Start needs to be the days from first ED visit (i.e. first visit to ED, ff_rank==1) to the previous repeat ED event.

    T-End: Days from first ED visit (ff_rank==1) to repeat ED visit (i.e. er_ff_visit==1).

    Interval: The ordered number of periods between events, beginning at 1 and continuing until end of follow-up.

    Please let me know if I can answer any questions or make anything more clear, and I am sorry if I have forgotten anything.

    Best,
    Sam


  • #2
    Hi Sam -- did you ever resolve this? I am having similar difficulties with my panel data (in order to apply the A-G model)... Thanks! Leanne

    Comment


    • #3
      https://www.stata.com/support/faqs/s...ure-time-data/
      Last edited by Bjarte Aagnes; 29 Dec 2020, 04:36.

      Comment

      Working...
      X