Is there a way to model autocorrelated residuals with non-integer covariates with brms?
Something like autocor = cor_??(~ time | subject), where time is an irregularly spaced continuous covariate. The grouping variable subject also has random intercepts and slopes with respect to the time variable.
Thanks for the advice regarding ctsem. I am not familiar with it and will check it out.
The data are quite messy, with 14 the median number of measurements per subject (a little over 500 subjects), ranging from 2 to 56. The median amount of time between measurements is 107 days, ranging all the way from 1 to 4500 days.
To make things even more messy, the treatments (4 kinds of anti-diabetes medication) are probably not independent of the response variable (blood glucose level), since the physicians prescribing them must have taken the current glucose level into account.