Outcome variable also goes into predictor

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()

There’s no solver rules—the only hard rule is that you need to have a continously differentiable log posterior. Multivariate time series are just fine.

There’s a chapter in the manual on dealing with ragged structures. It’s clunky but doable.

yes, I see that section. thanks for pointing that out.

and the question about using y as part of the predictor was just dumb. sorry about that. t