Skip to contents

Function to create a new prior for engine_stan models. Priors currently can be set on specific environmental predictors.


STANPrior(variable, type, hyper = c(0, 2), ...)

# S4 method for character,character
STANPrior(variable, type, hyper = c(0, 2), ...)



A character matched against existing predictors or latent effects.


A character specifying the type of prior to be set.


A vector with numeric values to be used as hyper parameters. First entry is treated as mean (Default: 0), the second as the standard variation (Default: 2) of a Gaussian distribution on the respective coefficient.


Variables passed on to prior object.


  • Lemoine, N. P. (2019). Moving beyond noninformative priors: why and how to choose weakly informative priors in Bayesian analyses. Oikos, 128(7), 912-928.

  • Carpenter, B., Gelman, A., Hoffman, M. D., Lee, D., Goodrich, B., Betancourt, M., ... & Riddell, A. (2017). Stan: A probabilistic programming language. Journal of statistical software, 76(1), 1-32.


if (FALSE) {
 pp <- STANPrior("forest", "normal", c(0,1))