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:
- run a survival model to subtract coefs representing individual survival parameters
- 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!