在使用“rstanarm”对回归模型尝试贝叶斯方法时,不允许重复的组特定术语。有什么解决办法吗?
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.