I have a really complex modeling problem. The eqn is
P(Yi1 = yi1,…,YiT = yiT,|S0 = s0,…,ST = sT)
Its a time series problem. The outcome involves values measured at times 1 to T. In addition, each Y[t] has two parts: N (int) and C (1 or 0). Both variables N[t] and C[t] actually also go into the log likelihood eqn. Does this violate stan’s solver rules?
Another challenge is the time series is not of equal length. The value of T varies across samples. I am having a hard time figuring out how to express this in the form of y ~ my_function()