Dear community,
I am implementing an age-depth model which which uses autoregressive gamma process.
A non-Gaussian autoregressive model is proposed for the sediment accumulation rates xj = w*xj+1 + zj. where zj ~ Gamma(alpha, beta / (1 - w)) are iid innovations. And w ~ Beta( aw, bw).
I have implemented this in pyMC as follows
w = pm.Beta('w', aw, bw)
alpha = pm.Gamma('alpha', a_alpha, (1 - w) / b_alpha, shape=K)
x = pm.Data('x', np.zeros(K))
for j in range(K - 2, -1, -1):
x[j].set(w * x[j + 1] + (1 - w) * alpha[j])
Is this the correct way to do this?
Thank you.