Announcement

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

  • Help with stcrreg / competing regression

    Dear All,

    I am trying to perform a competing regression analysis but receiving the following error.

    'option compete(): competing risks events must be stset as censored r(459);'

    Code as below:
    stset FU_MA_YEARS, failure(CVE_MAJ_AMP==1) scale(1)
    stcrreg IA, compete(Death==1)

    I believe the error may be related to the fact that both 'death' and 'CVE_MAJ_AMP' are separate variables.
    Would this be correct ? If so, what would be the best way to address this ? How can we incorporate both outcomes in the same variable ? Thank you.

  • #2
    Bump - just checking if anyone had any suggestions ? Thank you

    Comment


    • #3
      It would appear that example 1 (cervical cancer example) in the stcrreg help is identical to the scenario you describe. If not, then please provide more detail and a data example (using -dataex-).

      Comment


      • #4
        Thank you for your response.
        In example 1 - both the outcome of interest and the competing outcome are categories in one single variable (e.g . failtyple= 1 or 2) The time to event variable is - time to first event.

        In my dataset the outcome of interest (CVE_MAJ_AMP) and the competing outcome (Death) are separate variables with corresponding time to event variables (FU_MA_YEARS and Death_Years respectively).

        From what I have understood from the help file, my data needs to be set up in a way that I have a 'time to first event variable' - I currently have 2 separate time to event variables - one for CVE_MAJ_AMP and Death. I am unsure how to create a single time - to first event variable.

        Thank you for your help.
        Last edited by tejas singh; 30 Apr 2023, 20:32.

        Comment


        • #5
          Code:
          generate time_to_first_event = min(FU_MA_YEARS,Death_Years)

          Comment

          Working...
          X