Announcement

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

  • Can the log-rank test be used to compare cumulative incidence curves where the temporal order of events is known but not the actual times?

    I'm using Stata 15 on 64-bit W10 and I used dataex to provide sample data below.

    I have about one hundred patients (id) who have visited mental health professionals from 1-20 times (visit). I'm interested when, in the series of visits with these professionals, activities of daily living such as use of screens is first discussed or recommended. Using sts graph, I plotted the cumulative incidence curves for this against various factors such as gender, age group, diagnosis and provider type.where the event is the first time screen time is discussed or recommended (image below dataex output due to its large size; can it be resized?). I ran stset then sts graph to generate the graph below (actual code follows data listed below).

    Can I use survival methods including the log-rank test to compare these lines even though I don’t know the actual visit times but just their temporal order? Times between visits could be anywhere from a couple of weeks to a couple of months but they are not of interest and were not abstracted.

    If the log-rank test assumptions are violated and can’t be used to compare these lines, how can I compare them?

    Thanks for your help with this. Please ignore the images that follow the data; I wasn't able to delete them.

    Regards, John LeBlanc
    Dalhousie University
    Click image for larger version

Name:	Cumulative incidence of visit when screen use first discussed or recommended.png
Views:	2
Size:	143.1 KB
ID:	1515295


    Code:
    * 132 or original 595 obs kept.
    clear
    input int id byte(visit gender) float(agegrp scn)
    154  1 0 1 0
    154  2 0 1 0
    154  3 0 1 0
    154  4 0 1 0
    154  5 0 1 0
    154  6 0 1 0
    154  7 0 1 0
    154  8 0 1 0
    154  9 0 1 0
    154 10 0 1 0
    154 11 0 1 0
    154 12 0 1 0
    154 13 0 1 0
    154 14 0 1 0
    154 15 0 1 0
    154 16 0 1 0
    154 17 0 1 0
    154 18 0 1 2
    154 19 0 1 0
    154 20 0 1 0
    154 21 0 1 0
    154 22 0 1 0
    154 23 0 1 0
    154 24 0 1 0
    154 25 0 1 0
    154 26 0 1 0
    155  1 0 1 1
    155  2 0 1 1
    155  3 0 1 0
    155  4 0 1 0
    155  5 0 1 0
    155  6 0 1 0
    157  1 1 0 0
    158  1 1 0 0
    158  2 1 0 0
    158  3 1 0 0
    158  4 1 0 0
    159  1 1 0 1
    159  2 1 0 0
    159  3 1 0 0
    159  4 1 0 0
    159  5 1 0 0
    159  6 1 0 0
    159  7 1 0 0
    159  8 1 0 0
    159  9 1 0 0
    160  1 1 0 0
    160  2 1 0 1
    161  1 1 0 0
    161  2 1 0 0
    161  3 1 0 0
    161  4 1 0 0
    161  5 1 0 0
    161  6 1 0 0
    161  7 1 0 0
    161  8 1 0 0
    161  9 1 0 0
    161 10 1 0 0
    161 11 1 0 0
    161 12 1 0 0
    161 13 1 0 0
    161 14 1 0 0
    161 15 1 0 0
    161 16 1 0 0
    161 17 1 0 0
    161 18 1 0 0
    162  1 1 0 0
    164  1 1 0 0
    164  2 1 0 0
    165  1 1 0 1
    165  2 1 0 0
    165  3 1 0 0
    165  4 1 0 0
    165  5 1 0 0
    165  6 1 0 0
    165  7 1 0 0
    165  8 1 0 0
    165  9 1 0 0
    165 10 1 0 0
    165 11 1 0 0
    165 12 1 0 0
    165 13 1 0 0
    166  1 1 0 2
    166  2 1 0 0
    166  3 1 0 0
    166  4 1 0 0
    166  5 1 0 0
    166  6 1 0 0
    168  1 1 0 0
    168  2 1 0 0
    169  1 1 0 2
    169  2 1 0 0
    170  1 1 0 1
    170  2 1 0 0
    170  3 1 0 0
    170  4 1 0 0
    172  1 1 0 1
    172  2 1 0 0
    172  3 1 0 0
    172  4 1 0 0
    172  5 1 0 0
    172  6 1 0 0
    172  7 1 0 0
    172  8 1 0 0
    172  9 1 0 0
    172 10 1 0 0
    172 11 1 0 0
    172 12 1 0 0
    172 13 1 0 0
    172 14 1 0 0
    172 15 1 0 0
    172 16 1 0 0
    172 17 1 0 0
    172 18 1 0 0
    172 19 1 0 0
    172 20 1 0 0
    172 21 1 0 0
    173  1 1 0 1
    174  1 1 0 0
    175  1 1 1 1
    176  1 1 1 1
    176  2 1 1 0
    176  3 1 1 0
    177  1 1 1 0
    177  2 1 1 0
    177  3 1 1 0
    177  4 1 1 0
    177  5 1 1 0
    177  6 1 1 0
    177  7 1 1 0
    177  8 1 1 0
    177  9 1 1 0
    end
    label values gender gender
    label def gender 0 "Male", modify
    label def gender 1 "Female", modify
    label values agegrp agegrp
    label def agegrp 0 "Age 4-12", modify
    label def agegrp 1 "Age 13-16", modify
    label values scn disrec
    label def disrec 0 "Not raised", modify
    label def disrec 1 "Discussed", modify
    label def disrec 2 "Recommended", modify
    stset visit, failure(scn==1 2) scale(1) id(id)
    sts graph, failure by(gender) ytitle(% of patients) xtitle(Visit #) xscale(range(0 26)) title(Cumulative incidence of visit when screen use first discussed or recommended, size(medsmall))
    Attached Files
    Last edited by John LeBlanc; 06 Sep 2019, 05:25.
Working...
X