Hi, I want to fit a hierarchical model using **horseshoe** prior , I’ve considered two responses of **y** to **x**. One is linear response model (model 1):

```
fit_brm_linear <- brm(Y ~ X +(1 +X | group1) + (1 + X | group2),
data = dat,
family = exgaussian(),
chains = 3,
iter = 1000,
cores = 4,
control = list(adapt_delta=0.99),
prior=c(prior(horseshoe(1),class="b")),
seed = 1345
)
```

another one is non-linear response model (model2):

```
fit_brm_no_linear <- brm(Y ~ s(X) +(1 +X | group1) + (1 + X | group2),
data = dat,
family = exgaussian(),
chains = 3,
iter = 1000,
cores = 4,
control = list(adapt_delta=0.99),
prior=c(prior(horseshoe(1),class="b")),
seed = 1345
)
```

Model 1 worked fine, but model 2 reported an error:

`Prior 'horseshoe(1)' is used in an invalid context. See ?set_prior for details on how to use special priors`

.

I’m confused about this. I think model 2 formula maybe is wrong but the model 2 work well when no prior is specified for it. Is there a specific non-linear formula when using horseshoe prior?

I would appreciate it if you could give me some advice.