Skip to contents

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

Usage

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

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

Arguments

variable

A character matched against existing predictors or latent effects.

type

A character specifying the type of prior to be set.

hyper

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.

References

  • 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.

Examples

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