Announcement

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

  • gsem for joint modelling with binary longitudinal outcome

    Dear all, I have a wide shaped (thanks to Clyde Schechter again!) dataset in which I collected the time-to event data of the drop out of 5 drugs, in different hospitals and with covariates (adverse events, therapeutci success and so on.)

    Simplifying my variables are:
    • 5 different drugs (variable: "drug")
    • Adverse events (time dependent dichotomous variable: "AdEvents")
    • Therapeutic success (time dependent dichotomous variable: "dicOutcome")
    • drug dropout: "intherapy == 0" (absence of outcome)
    • followup time: "followup"
    • variable order of followup (first, second, third ... followup: variable "t")
    • center (variable "hospital")
    The aims of the study are:
    • to estimate dropout time in the 5 drugs, accounting for the different hospitals)
    • to estimate longitudinalli adverse events (variable "AdEvents") and therapeutci succes (variable "dicOutcome")
    I ran a shared frailty model that worked very well.
    Anyway, I'd like to investigate dropout, adverse events and therapeutc success simultaneously.

    My idea is to run two joint models:
    • dropout (time-to-event) and adverse event (longitudinal variable) and accounting for Sex, Age and therapeutc effect
    • dropout (time-to-event) and therapeutc effect (longitudinal variable) and accounting for Sex, Age and adverse event
    I did it by the command "stjm". The problem is that stjm cannot accomodate binary longitudinal variables.

    The command to use, as I can see, is "gsem"

    I'm having a lot of troubles in specifying it. Does anybody know what the correct code is?

    I declared time-to-event data:
    stset followup, id(id) failure(intherapy == 0).

    The I tried many times but it never worked.

    Thanks in advance.
    I hope this topic will be useful not only to me


    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(id t followup intherapy) int age byte(sex drug) float dicOutcome byte AdEvents str5 hospital
     1 1         6 1 39 0 5 0 0 "IS_"
     1 2        12 1 39 0 5 0 0 "IS_"
     1 3 12.866667 1 39 0 5 0 0 "IS_"
     1 4        36 1 39 0 5 0 0 "IS_"
     2 1         6 1 28 1 1 0 0 "IS_"
     2 2        12 1 28 1 1 1 0 "IS_"
     2 3 20.766666 1 28 1 1 1 0 "IS_"
     2 4        36 1 28 1 1 1 0 "IS_"
     3 1         6 1 31 1 1 0 0 "IS_"
     3 2        12 1 31 1 1 0 0 "IS_"
     3 3      21.3 1 31 1 1 0 0 "IS_"
     3 4        36 1 31 1 1 0 0 "IS_"
     4 1         6 1 31 1 3 0 0 "IS_"
     4 2        12 1 31 1 3 1 0 "IS_"
     4 3      14.2 1 31 1 3 1 0 "IS_"
     4 4        36 1 31 1 3 1 0 "IS_"
     5 1         6 1 21 0 1 0 0 "IS_"
     5 2        12 1 21 0 1 0 0 "IS_"
     5 3        24 1 21 0 1 0 0 "IS_"
     5 4 33.466667 1 21 0 1 0 0 "IS_"
     6 1         6 1 28 1 1 0 0 "IS_"
     6 2        12 1 28 1 1 0 0 "IS_"
     6 3        20 0 28 1 1 0 0 "IS_"
     7 1         6 1 27 1 1 0 0 "IS_"
     7 2        12 1 27 1 1 1 0 "IS_"
     7 3        24 1 27 1 1 1 0 "IS_"
     7 4 33.466667 1 27 1 1 1 0 "IS_"
     8 1         6 1 30 1 3 0 1 "IS_"
     8 2        12 1 30 1 3 0 1 "IS_"
     8 3 33.466667 1 30 1 3 0 1 "IS_"
     8 4        36 1 30 1 3 0 1 "IS_"
     9 1         6 1 31 0 1 0 0 "IS_"
     9 2        12 1 31 0 1 1 0 "IS_"
     9 3        24 1 31 0 1 1 0 "IS_"
     9 4 33.466667 1 31 0 1 1 0 "IS_"
    10 1         6 1 34 1 2 1 1 "IS_"
    10 2        12 1 34 1 2 1 1 "IS_"
    10 3        24 1 34 1 2 1 1 "IS_"
    10 4      44.6 1 34 1 2 1 1 "IS_"
    11 1         6 1 33 0 2 0 0 "IS_"
    11 2        12 1 33 0 2 1 0 "IS_"
    11 3        24 1 33 0 2 1 0 "IS_"
    11 4  43.66667 1 33 0 2 1 0 "IS_"
    12 1         6 1 50 0 2 1 0 "IS_"
    12 2        12 1 50 0 2 1 0 "IS_"
    12 3        24 1 50 0 2 1 0 "IS_"
    12 4  45.63334 1 50 0 2 1 0 "IS_"
    13 1         6 1 40 1 2 1 0 "IS_"
    13 2        12 0 40 1 2 1 0 "IS_"
    14 1         6 1 56 0 2 0 0 "IS_"
    14 2       9.1 1 56 0 2 0 0 "IS_"
    14 3        12 1 56 0 2 0 0 "IS_"
    14 4        36 1 56 0 2 0 0 "IS_"
    15 1         6 1 41 1 1 1 0 "IS_"
    15 2        12 1 41 1 1 1 0 "IS_"
    15 3        24 1 41 1 1 1 0 "IS_"
    15 4  45.56667 1 41 1 1 1 0 "IS_"
    16 1         6 1 22 1 1 0 0 "IS_"
    16 2        12 1 22 1 1 1 1 "IS_"
    16 3        24 1 22 1 1 0 1 "IS_"
    16 4      44.6 1 22 1 1 0 1 "IS_"
    17 1         6 1 58 1 1 1 1 "IS_"
    17 2        12 1 58 1 1 1 0 "IS_"
    17 3        24 1 58 1 1 1 0 "IS_"
    17 4  45.63334 1 58 1 1 1 0 "IS_"
    18 1         6 1 38 1 1 1 0 "IS_"
    18 2        12 1 38 1 1 1 0 "IS_"
    18 3        24 1 38 1 1 1 0 "IS_"
    18 4  45.63334 1 38 1 1 1 0 "IS_"
    19 1         6 1 22 0 3 1 0 "IS_"
    19 2        12 1 22 0 3 1 0 "IS_"
    19 3        24 1 22 0 3 1 0 "IS_"
    19 4 33.466667 1 22 0 3 1 0 "IS_"
    20 1         6 1 18 1 3 1 0 "IS_"
    20 2        12 1 18 1 3 1 0 "IS_"
    20 3        24 1 18 1 3 1 0 "IS_"
    20 4  45.43333 1 18 1 3 1 0 "IS_"
    21 1         6 1 20 1 3 1 0 "IS_"
    21 2        12 1 20 1 3 1 0 "IS_"
    21 3        24 1 20 1 3 1 0 "IS_"
    21 4 33.266666 1 20 1 3 1 0 "IS_"
    22 1         6 1 29 0 3 1 0 "IS_"
    22 2        12 1 29 0 3 1 1 "IS_"
    22 3        24 1 29 0 3 1 1 "IS_"
    22 4 33.466667 1 29 0 3 1 1 "IS_"
    23 1         6 1 59 1 3 1 0 "IS_"
    23 2        12 1 59 1 3 1 0 "IS_"
    23 3        24 1 59 1 3 1 0 "IS_"
    23 4  45.63334 1 59 1 3 1 0 "IS_"
    24 1         6 1 19 0 3 1 0 "IS_"
    24 2        12 1 19 0 3 1 0 "IS_"
    24 3        24 1 19 0 3 1 0 "IS_"
    24 4 33.466667 1 19 0 3 1 0 "IS_"
    25 1         6 1 43 1 3 0 0 "IS_"
    25 2        12 1 43 1 3 0 0 "IS_"
    25 3        13 0 43 1 3 0 0 "IS_"
    26 1         6 1 40 0 3 0 1 "IS_"
    26 2        12 1 40 0 3 0 1 "IS_"
    26 3        13 0 40 0 3 0 1 "IS_"
    27 1         6 1 28 1 3 0 0 "IS_"
    end
Working...
X