% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/priors.R
\name{priors}
\alias{priors}
\alias{prior_lognormal}
\alias{prior_normal}
\alias{prior_beta}
\alias{prior_halfnormal}
\alias{prior_halfcauchy}
\alias{prior_exponential}
\title{Prior Distribution Specifications for BDEB Models}
\usage{
prior_lognormal(mu = 0, sigma = 1)

prior_normal(mu = 0, sigma = 1)

prior_beta(a = 2, b = 2)

prior_halfnormal(sigma = 1)

prior_halfcauchy(sigma = 1)

prior_exponential(rate = 1)
}
\arguments{
\item{mu}{Mean.}

\item{sigma}{Scale of the half-Cauchy.}

\item{a}{Shape parameter alpha.}

\item{b}{Shape parameter beta.}

\item{rate}{Rate parameter (1/mean).}
}
\value{
A \code{bdeb_prior} object (list with class \code{"bdeb_prior"}).
}
\description{
Constructor functions for prior distribution objects used in
\code{\link[=bdeb_model]{bdeb_model()}}.  Each returns a lightweight \code{bdeb_prior} S3 object
that encodes the distribution family and its hyperparameters.  The
prior is evaluated inside the Stan \code{model} block; hyperparameters are
passed as data so that changing priors does not require recompilation.
}
\details{
The choice of prior family follows the recommendations for DEB
parameters in Hackenberger (2025, Ch. 6) and general guidelines
from Gelman et al. (2013, Sec. 2.9):
\itemize{
\item Positive rate parameters (\eqn{\{p_{Am}\}}, \eqn{[p_M]},
\eqn{v}, \eqn{[E_G]}) — log-normal, because the log-transform
maps the strictly positive domain to the real line.
\item Allocation fraction \eqn{\kappa \in (0,1)} — Beta, the
natural conjugate for bounded parameters.
\item Observation-error standard deviations — half-normal (or
half-Cauchy for heavier tails), which place zero mass on negative
values (Gelman, 2006).
\item Hierarchical standard deviations — exponential, following
the advice of Betancourt & Girolami (2015) for non-centred
parameterisations.
}
}
\section{Functions}{
\itemize{
\item \code{prior_lognormal()}: Log-normal prior (for positive parameters: p_Am, p_M, v, E_G, etc.)

\item \code{prior_normal()}: Normal prior (for unconstrained parameters)

\item \code{prior_beta()}: Beta prior (for (0,1)-constrained parameters: kappa)

\item \code{prior_halfnormal()}: Half-normal prior (for scale parameters: sigma_L, etc.)

\item \code{prior_halfcauchy()}: Half-Cauchy prior (for scale parameters, heavier tails)

\item \code{prior_exponential()}: Exponential prior (for variance components in hierarchical models)

}}
\examples{
# Log-normal prior on assimilation rate: median ~ exp(1.5) ~ 4.5
prior_lognormal(mu = 1.5, sigma = 0.5)

# Beta(2,2) prior on kappa — symmetric, favouring 0.5
prior_beta(a = 2, b = 2)
}
\references{
Gelman, A. (2006). Prior distributions for variance parameters in
hierarchical models. \emph{Bayesian Analysis}, 1(3), 515--534.
\doi{10.1214/06-BA117A}

Gelman, A., Carlin, J.B., Stern, H.S., Dunson, D.B., Vehtari, A.
and Rubin, D.B. (2013). \emph{Bayesian Data Analysis}. 3rd edition.
Chapman & Hall/CRC.
}
