Announcement

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

  • gsem for a shared parameter model

    i am trying to run a joint longitudinal mixed model (for severity of illness across time) and proportional odds model (for time to dropout) using gsem. in the code below, i first ran the mixed model and proportional odds models separately, and then was able to replicate the separate model results with the first instance of the gsem code below. I then wanted to allow the random effects from the longitudinal model to have effects on maxweek (time to dropout model). this is sometimes called a shared parameter model, and the gsem code is the 2nd instance below. however, when i do that, a constraint is placed on the M2[id] effect on maxweek. i can't seem to figure out how to override this constraint, and allow the 2nd random effect to also influence maxweek. any suggestions are appreciated. thanks.

    infile id imps79 time drug sweek swkdrug maxweek using schizrep_surv.dat, clear

    by id, sort: generate tolist = (_n==1)
    bys id: replace maxweek = . if _n>1
    summ

    * random intercept and trend model
    mixed imps79 drug sweek swkdrug || id: sweek, covariance(unstructured) mle

    * proportional odds model
    ologit maxweek drug

    * GSEM - two separate models
    gsem (imps79 <- c.drug c.sweek c.swkdrug M1[id] c.sweek#M2[id]) ///
    (maxweek <- drug, ologit)

    * GSEM - shared parameter model
    gsem (imps79 <- c.drug c.sweek c.swkdrug M1[id]@1 c.sweek#M2[id]@1)
    (maxweek <- drug M1[id] M2[id], ologit)

  • #2
    (maxweek <- drug M1[id] c.swkdrug#M2[id], as M1 & 2 [id] are identical. However, I am not completely confident as I had some problems with this. Including random effects in both will generate a multiprocess model, if all data are longitudinal, which is also a joint model.

    Comment

    Working...
    X