m1 <- inla(Y ~ 1 +
# Autoregressive
+ f(time_step, model="ar",
order=1,
replicate=participant_f,
values=1:max(df$time_step),
hyper = hyper_participant_f,
constr=FALSE
)
, data=df, family="gaussian"
, control.inla=list(strategy="adaptive", int.strategy="auto")
, control.compute=list(return.marginals.predictor=TRUE, cpo=TRUE, waic=TRUE, dic=TRUE, config=TRUE)
, verbose=TRUE
)