Splines in Rstanarm


I have encountered this nice case study for splines in Stan: Splines In Stan and I am wondering whether rstanarm would allow us fit some default spline models without writing the stan code?


Check ?rstanarm::stan_gamm4

Thanks so much!

Sorry to bother again. After fitting the model using stan_gamm4, is there any way that I could extract the coefficients from the posterior draws and get the posterior distribution of new predictions?


I know this question was about rstanarm, but Gavin Simpson has written several nice articles about using splines with brms. Here is one of them Fitting GAMs with brms: part 1
I am not sure about rstanarm, but in brms, you can simply do fitted(model, newdata= newdata) to get predicted mean response values or predict(model, newdata=newdata) to get predicted response values.