In the example model page, the regularised horseshoe prior is given as follows as per Piironen & Vehtari (2017) Electronic Journal of Statistics:
regularized_horseshoe <- function (tau = 1, c = 1, dim = NULL) {
stopifnot(c > 0)
lambda <- cauchy(0, 1, truncation = c(0, Inf), dim = dim)
lambda_tilde <- (c^2 * lambda^2) / (c^2 + tau^2 * lambda^2)
sd <- tau ^ 2 * lambda_tilde ^ 2
normal(0, sd, dim = dim)
}
However, Piironen & Vehtari (2017) seems to denote tau ^ 2 * lambda_tilde ^ 2
as variance sd^2
. If this is true, should the penultimate line be sd <- tau * lambda_tilde
instead?