I am very new to brms and R in general and would love some help on this issue.
I am trying to fit this brms model
fit_preference_nl ← brm(form_preference_nonlinear,
data = dfEUPA_NoNAs_SiteVisit_Single,
cores = cores,
chains = chains,
init_r = init_r,
iter = iter,
thin = thin,
seed = seed,
file = paste0(“results”,run_date),
control = control)
The formula I am using is
f_preference_linear ← cEatenUneatenPartiallyLikely ~ 1 + iAge +
and then added this code
form_preference_linear ← bf(f_preference_linear) + categorical()
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?