I have a multilevel mixture (zero and one inflated) model and I would like to extract individual level estimates of the different parameters in an automated way.
The model is
model_f <- bf(
Outcome ~ 0 + Diagnosis + Diagnosis:Time + (1 + Time| p | gr(ID, by = Diagnosis)),
phi ~ 0 + Diagnosis + (1 | p | gr(ChildID, by = Diagnosis)),
zoi ~ 0 + Diagnosis + Diagnosis:Visit + (1 + Time | p | gr(ID, by = Diagnosis)),
coi ~ 0 + Diagnosis + Diagnosis:Visit + (1 + Time | p | gr(ID, by = Diagnosis))
)
where Time is a value between 1 and n. Now for each of the ID at each point in time I would like an estimate of their propensity to have a 0 outcome, one of their propensity to have a 1, and one of their estimated outcome of the beta (no matter if in log odds or 0-1 scale). posterior_linpred only gives me the overall predicted outcome after combining the three models. Combining things by hand for each ID is quite tedious and I was wondering whether I had missing some function that could help me with that.