Hello
I am working on a dataset consisting on longitudinal biomarker measures before death. thre sampling is heterogeneous across participants. I have outcomes at the time of death .
I iniitally built models using only the biomarker closest to death as a predictor of my outcome measured at the time of death but I am missing information about the trajectories (i.e. rising, stable ,decreasing )
stan_glmer(formula=outcome ~ biomarker_level +(1|pid), …)
I would like to include all measures to have both trajectories and levels to be considered. it is probably close to stan_jm but this is not a survival model (the outcome is not death but a continuous measure)
any suggestions?
this does not work:
stan_jm(formulaLong = biomarker_vectorofvalues ~ days +gender+ (days | id),
dataLong = df_long,
formulaEvent = outcome ~ gender + …,
dataEvent = df_final,
time_var = “days”,
chains = 1, refresh = 2000, seed = 12345)
thank you