Mu of pm.Normal() depends on output of RandomVariable on previous time step. How do I implement this?

The states are nonsense because you have desList = T.empty(nSteps). It’s just whatever bytes happened to be at some memory locations when the array was created.

What are the states in your model, \bar \theta^{\text{aim}}_t? Since everything is normal in your model, you can take the mean across all your posterior predictive draws of lik to get that back. As an aside, I don’t like that convention of naming the observed variable “likelihood”, because it’s not really the likelihood term. It’s the distribution that generates the observed data, which is then used to compute the likelihood. Naming it “lik” obscures the fact that your predicted states will come from it.

2 Likes