I’m trying smooth spline modeling with brm(). However, it does not seem to allow me to handle smooth splines at the group level as indicated in the following error message:
Error: Cannot handle splines or GPs in group-level terms.
Is there any fundamental issue that does not permit group-level spline modeling? Or is it simply an implementation issue?
In general, please provide the code of the brms models you want to fit.
For your problem I fortunately know what you did so I can comment on your problem without seeing the code.
group-level splines have to be specified within the s() or t2() calls. I suggest you take a look a the doc of mgcv::s and look for “factor-smooth interactions” (argument bs="fs"). You will need to install the latest versions of mgcv and brms in order to run this. Be aware that such models may take very long time to fit.
When I try to fit the model, I the same error message as Gang:
Error: Cannot handle splines or GPs in group-level terms.
In paul.buerkner’s answer I saw he recommended looking into the factor-smooth interactions with argument bs=“fs”, however I am using bs=‘ts’ for my code, does this change the solution?