Model: $$y \mid x, \tau \sim N(x, \tau^{-1} I)$$ $$x \mid \kappa \sim N(0, (\kappa Q)^{-1}), \quad Q = D - \rho A \text{ (proper CAR)}$$ $$\tau \sim \mathrm{Gamma}(a_{\tau}, b_{\tau}) \quad \text{(shape-rate)}$$ $$\kappa \sim \mathrm{Gamma}(a_{\kappa}, b_{\kappa}) \quad \text{(shape-rate)}$$
sample_proper_car(
y,
A,
rho = 0.99,
n_iter,
burn = 0L,
thin = 1L,
a_tau = 1,
b_tau = 1,
a_kappa = 1,
b_kappa = 1,
init = NULL,
symmetrize = FALSE,
check = TRUE
)List with x (matrix), tau, kappa, and settings.
Numeric vector of observations (length n).
Adjacency matrix (dense or sparse). Diagonal ignored.
Proper CAR dependence parameter (must satisfy car_precision checks).
Integer number of iterations.
Integer burn-in iterations to drop (default 0).
Integer thinning interval (default 1).
Gamma(shape, rate) prior for tau.
Gamma(shape, rate) prior for kappa.
Optional list with elements x, tau, kappa.
Passed to car_precision().
Passed to car_precision().