Combining AR/Negative Binomial with Gaussian Random Walk

I’m not sure that the convergence rate of ELBO necessarily indicates anything.

When you say “OK results but pretty far off the mark,” what exactly do you mean? You have some aggressively broad priors (N(0, 100) / HalfCauchy(4)) on a huge number of parameters. It would require quite a lot of data to overcome these uncertainties.

I would try a couple of things to simplify the model further. More informative priors would help (do you think beta values of 200 are reasonable? If not, then why N(0,100)?) You can also share variances within and/or across the levels. For instance, it looks like each of your standard deviation variables is point-specific (shape (N, K)). You might pool this like:

  vars12_alpha_sd_pooled =pm.HalfCauchy('vars12_alpha_sd_pooled_',beta=4,shape=(1,vars12_count))
  vars12_alpha_sd = pm.Deterministic('vars12_alpha_sd', tt.dot(tt.ones((N, 1)), vars12_alpha_sd_pooled))

or even make it global for the level

  vars12_alpha_sd_collapsed =pm.HalfCauchy('vars12_alpha_sd_collapsed',beta=4)
  vars12_alpha_sd = pm.Deterministic('vars12_alpha_sd', vars12_alpha_sd_collapsed * tt.ones((N, vars12_count)))