The prior distribution functions are used to set the values of prior parameters.
Users can control the values of the parameters, but the distribution (model) itself is fixed. The intercept and regression coefficients are given Gaussian prior distributions and scale parameters are assigned Student's t prior distributions. Degrees of freedom parameters are assigned gamma priors, and the spatial autocorrelation parameter in the CAR model, rho, is assigned a uniform prior. The horseshoe (hs
) model is used by stan_esf
.
Note that the variable
argument is used internally by geostan
, and any user provided values will be ignored.
The horseshoe prior
The horseshoe prior is used by stan_esf
as a prior for the eigenvector coefficients. The horseshoe model encodes a prior state of knowledge that effectively states, 'I believe a small number of these variables may be important, but I don't know which of them is important.' The horseshoe is a normal distribution with unknown scale (Polson and Scott 2010):
beta_j ~ Normal(0, tau^2 * lambda_j^2)
The scale parameter for this prior is the product of two terms: lambda_j^2
is specific to the variable beta_j
, and tau^2
is known as the global shrinkage parameter.
The global shrinkage parameter is assigned a half-Cauchy prior:
tau ~ Cauchy(0, global_scale * sigma)
where global_scale
is provided by the user and sigma
is the scale parameter for the outcome variable; for Poisson and binomial models, sigma is fixed at one. Use global_scale
to control the overall sparsity of the model.
The second part of the model is a Student's t prior for lambda_j
. Most lambda_j
will be small, since the model is half-Cauchy:
lambda_j ~ Cauchy(0, 1)
This model results in most lambda_j
being small, but due to the long tails of the Cauchy distribution, strong evidence in the data can force any particular lambda_j
to be large. Piironen and Vehtari (2017) adjust the model so that those large lambda_j
are effectively assigned a Student's t model:
Big_lambda_j ~ Student_t(slab_df, 0, slab_scale)
This is a schematic representation of the model; see Piironen and Vehtari (2017) or Donegan et al. (2020) for details.