According to the documentation for the `R2D2()`

prior function in brms it can be applied across a variety of classes:

However, I’m having trouble finding explanations/examples of the R2D2 prior in use in GP’s and I’m struggling a bit to understand the meaning of subtle points. I’m also unclear on this `main`

arugment. I made some example models to explore a bit:

```
dat <- mgcv::gamSim(1, n = 30, scale = 2)
# fit some GP models
fit1 <- brm(y ~ x1 + gp(x2), dat, chains = 2)
fit2 <- brm(y ~ x1 + gp(x2), dat, chains = 2,
prior = set_prior(R2D2(mean_R2 = 0.8, prec_R2 = 2, cons_D2 = 0.9), class = "sdgp"))
fit3 <- brm(y ~ x1 + gp(x2), dat, chains = 2,
prior = c(set_prior(R2D2(mean_R2 = 0.8, prec_R2 = 2, main = TRUE), class = "sdgp"),
set_prior(R2D2(mean_R2 = 0.8, prec_R2 = 2), class = "b")))
```

Ok so if I look at the `prior_summaries()`

:

I can see the length scale for the GP doesn’t change. In the second model I see R2D2 on the `sdgp`

term - I guess the shrinkage applies only on the sd term - do I interpert that correctly? Then in fit3 I have R2D2 priors on the class b coefficients too. Here I have questions. I set the main term under guidance of error messages and documentation - but I dont’ really grok it.

- Does it just mean there is a common
`cons_D2`

parameter to all R2D2 terms on the b and sdgp class priors set by the prior with`main = TRUE`

? - I can set different mean_R2 and prec_R2 for b and sdgp priors. But I struggle with what this means. For example if I set
`mean_R2`

for the b class to 0.8 but 0.4 to the sdgp class, does that mean b is given priority in the model ? In other words am I saying I think that b class variables are twice as likely to explain variation compared to sdgp class? - The length scale isn’t given an R2D2 prior - is there a reason for this? (
*side question - where are 1.494197, 0.056607 values coming from?*)