AR model "too many indices for array"

You need to provide shape (AR could not figure this out dynamically) and pass a distribution (instead of a RandomVariable) to init:

with pm.Model() as model:
    pm.AR("ar", rho=[0.9], sd=5.0, constant=False,
          init=pm.Normal.dist(mu=0.0, sd=1.0), shape=100)

4 Likes