I’m trying to approach for the first time Probabilistic Programming, what i want to do is create a hierarchical model for time series. I’m starting with this simple following model:
sigma_Z= pm.Uniform('sigma_Z', 0,3) Z = pm.GaussianRandomWalk('Z', sd=sigma_Z, shape=N) sigma_X = pm.Uniform('sigma_X', 0,3) X = pm.Normal('X', Z[tt_i], sigma_X, observed=x) trace = pm.sample()
How can I extend the model adding another layer above the Z?
In other words, i want add another Latent Variable Y, with each z_i is conditioned from y_i in order to create a hierarchical model.