Truncating priors within a linear model with random intercepts

I am using brms to create a hierarchical, linear (log link) regression model. The model has 15 covariates, which are a combination of continuous and categorical (2 levels) variables, and group specific random intercepts (there are 51 groups). I’d like to include priors on a subset of the continuous covariates, with different upper and lower bounds on these priors.

While this question has been asked before (see Horseshoe prior on subset of predictors), it’s unclear to me how to modify the non-linear syntax code to include random intercepts.

An example of the model I’d like to run is below:

priors <-c(set_prior(“normal(0, 1)”, class = “b”, nlpar = “a”, ub=0), #Neg
set_prior(“normal(0, 1)”, class = “b”, nlpar = “b”, lb=0) #Pos
)
model <-brm(bf(y ~ a + b + var7 + … + var15 + (1|group), nl=T) +
lf(a ~ var1 + var2 + var3, center = TRUE) +
lf(b ~ var4 + var5 + var6, center = TRUE),
data=dat, family=gaussian(link=log),
prior = priors)

When I run a model with the above code, the following error is generated: Error: Factors with more than two levels are not allowed as covariates.

Hi,
sorry for not getting to you earlier. Did you manage to resolve the problem in the meantime? In any case, it would greatly help if you could reduce the model and find the simplest example that still manifests the issue. If you could share a (subset of) the data you are using that would also help.

Further I dont understand why are you using the non-linear syntax here (in particular, you are no longer using var7 to var15 as “predictors” in the usual sense, just offsets)

Best of luck with your model!