While trying bayesian approach on regression models using "rstanarm", duplicate group specific terms are not allowed. Is there any solution for this?
Formula = "SleepTime ~ 1 + WorkingHours + (1 + WorkingHours | JobClass) + Tenure + (1 + Tenure | JobClass)"
bayesian = stan_lmer(Formula, data = data_model)
Error in check_reTrms(group) :
rstanarm does not permit formulas with duplicate group-specific terms.
In this case JobClass is used as a grouping factor multiple times and
(Intercept) is included multiple times.
Consider using || or -1 in your formulas to prevent this from happening.