I have a (probably silly) question about the default sigma prior that brms uses.
It is my understanding that the default sigma prior is a half student t distribution with 3 degrees of freedom, a location of 0, and a scale given by max(2.5, mad(y)).
However, if I sample from the prior after running the model, I don’t see that the location of the prior on sigma is 0. Instead, it seems to be shifted to the right. How does this work exactly? Is this due to the fact it is a half student-t distribution?
Below I put some code to show the prior sigma distribution after running the model.
library(tidyverse) library(brms) set.seed(1) data <- tibble(y = rnorm(100)) model <- bf(y ~ 1) get_prior(model, data) # default df of 3, default location of 0, default scale of max(2.5, mad(y)) fit <- brm(formula = y ~ 1, data = data, sample_prior = TRUE) prior_samples(fit, ) %>% ggplot(aes(x = sigma)) + geom_density()
- Operating System: macOS Big Sur 11.0.1 (20B29)
- brms Version: 2.14.4