New to Stan, how do input my prior to the glm model

Hi there,

I am quite new to Stan. I know a bit of Bayesian framework. From what I’ve learned we need to specify the prior in the framework and the choice of the prior is important especially when dealing with small data sample size. I read a bit of the spec of the function stan_glm, but could not find the way to define a specific prior such that I know from the literature that my parameter is a normal distribution with some variance. How could I specify the model? There is only main and scale in the normal type in prior, where can I specify std?

Thanks,

If you are referring specifically to the stan_glm function in the rstanarm package, it can take as a prior a call to the normal function whose arguments, location and scale, refer to the mean and standard deviation respectively. So, for example normal(-1, 2.5) would be legal syntax.

1 Like