Dear Stan developers:

I have constructed a Bayesian semiparametric model with penalised splines and autoregressive errors for my simulated data. However, it was run alright (no divergence after warmup and no other warning messages and the outputs look fine) a couple of weeks ago and I had about 10 days off without working on this particular model and I came back to run it again both on my desktop computer and on my laptop. However, it failed to run, I kept getting the message.

**Gradient evaluation took 0.296 seconds**

**1000 transitions using 10 leapfrog steps per transition would take 2960 seconds.**

**Adjust your expectations accordingly!**

And then it just takes forever to run.

I am a bit confused as the model was running okay previously, but now it seems to have trouble. Where can potentially go wrong in this case? I begin debugging the issue by omitting the modelling block and just to generate both univariate B-splines basis functions and bivariate B-spline basis functions for the interaction terms in the model to see whether it will get stuck again.

My data is not particularly large only 101 observations with 12 basis functions in both univariate and bivariate B-splines with first-order differencing penalties for smoothness.

bayesian semi-parametric model with penalised splines and AR(1) errors.R (2.4 KB)

Any suggestions and ideas are most welcome.

Thanks in advance,

Jaslene