I think there are two things:
- The level and slope components are random variables by virtue of their autoregressive structures. As a result, you need to write the scan so PyMC knows this. Some examples are here and here , with some small discussion of the finer points here .
- MCMC struggles with data that is completely noiseless. For comparison you could try to estimate that straight line as a linear regression – you’ll get loads of divergences. If that’s your data, i’d remove the innovations and just try to estimate the initial states.