Autocorrelation in a model

There is AR(n) distribution for this purpose, see eg http://docs.pymc.io/notebooks/AR.html