Using workaround to use censored predictor time-to-event data

Hi!

I have asked this question in an existing topic (Survival analysis with right censored and interval censored data with brms - #6 by paul.buerkner ), but haven’t gotten any further as of yet.

I am interested in predicting psychopathology development over time using survival parameters from the survival model.
I have data collected using ESM in daily life during which individuals reported whether they had stressful events and reported their stress for the rest of the day. My overall goal is to find out whether the time to recovery from stressful events can predict psychopathology development. My analysis plan therefore was as follows:

  1. run a survival model to subtract coefs representing individual survival parameters
  2. use these individual survival parameters as predictors in the model predicting psychopathology over time in the form of : psychopathology ~ time*survival_coefs (of course also including all relevant random effects)

The dataset looks like this:
status (1 = recovered to baseline level of stress / 0 = not recovered within followup time)
time1 and time2: when status = 1 (recovered): Time 1 and time 2 are interval in which recovery has happened.When status = 0 (not recovered) then time1 is the amount of follow-up time during which recovery did not occur
SA.b.s is the level of stress at the time of the event (indicator of how stressful the event was
cens is the censoring variabele I created for the brms model

my data is, if I am not mistaken, both right-censored (not everyone recovers in the follow-up time) and interval censored (we know recovery happened somewhere between time1 and time2, but are not sure exactly which minute).

I am not sure whether I created the censoring variable in the right way. I defined it now as 0=observed recovery and 1=censored (right censored). See sample of the data below:

I formulated my brms syntax as follows:
fit1 ← brm(time1 | cens(cens, time2) ~ SA.b.s + (1 + SA.b.s |ID)

My questions are:

  • does the analysis plan make sense?
  • did I create the censoring variable in the right way?
  • is the brms code right? especially with regards to the censoring?

Thanks so much in advance!

I’m not sure about this specification for the censoring structure.

If your observations are interval-censored then the censoring label for them is 2. For mixed censoring with interval and right-censored observations, the observations with cens == 2 are interval-censored between time1 and time2, cens == 1 are right-censored at time1, and cens == 0 are not censored (value of the variable is known). So if your row 1 represents a subject who was observed until time 698 but then lost to follow up, and your third row represents a subject whose event occurred sometime between time 1 and time 96, then cens for row 3 should be 2.

Another specification point is that time2 should not contain any NA. I think any row with NA for any variable in the model will be dropped even if the value wouldn’t be used for that observation.

I also wouldn’t use the column name cens because it matches the argument in the formula.

As for the model, I’m not sure. I suppose you could obtain ID specific estimates and pass them as data into another model. In principle you could do this with a two-stage approach or with one joint model.

Thanks so much for your response! I am trying out your adjustments as we speak. I will report back on whether it worked.

It worked, thanks again!