I am working my way up in understanding how to use Stan to model longitudinal data on multiple subjects with irregular measurement times. My context is that I want to have a general approach that works the same for linear models as for binary and ordinal logistic models, so for the latter I want to specify random effects on the logit scale and need to specify the per-observation contribution to the log-likelihood. My ordinal logistic model has a lot of nuances such as interval censoring and departures from the proportional odds assumption. So I need an approach that does not require latent variables but models directly on the logit scale random effects.
Starting with Autoregressive Models in Stan I see a very simple specification for a non-hierarchical (one subject time series) Gaussian situation. To build towards my ultimate goal, how would you re-write the concise code there to get the same result by specifying the per-observation log-likelihood? Then how would you generalize that to the hierarchical multi-subject case where there is a random normal intercept for each subject that kicks off the process at the first time?
Once I understand that regular equal time-spacing AR(1) approach Iād like to generalize to the unequal measurement time case using an Ornstein-Uhlenbeck lag-1 process as described here. That doesnāt look too hard once I gain an understanding of how to bring in the AR(1) random components.
@bgoodri developed this code but I had some sampling problems and could not get a wide range of autocorrelations using it. And I canāt see how it doesnāt have a large number of parameters for the white noise eps
(n \times (T-1) parameters where T is the maximum number of time points per subject and n is the number of subjects).
There is a long related discussion here but itās hard to dive into such a lengthy discussion.
Thanks any advance for any help.