Skip to contents

The full conditionals correspond to the joint precision Q = (D - W)/tau^2 with D the diagonal of neighbour counts. Q has the constant vector in its null space, so the prior is improper (rank n - 1) and needs a sum-to-zero constraint; the smallest eigenvalue being exactly zero is the check the tests apply.

Usage

Icarbm(adjacency, tau = 1, u = NULL)

Arguments

adjacency

Symmetric 0/1 neighbour matrix with zero diagonal.

tau

Positive conditional scale.

u

Optional field values at which to evaluate the conditionals.

Value

List with estimate, precision, conditional_mean, conditional_var, pairwise_quadratic, log_density_kernel, smallest_eigenvalue, mean_u, n, method.

Details

Formula: u_i | u_-i ~ N(mean of the n_i neighbours, tau^2 / n_i).

References

Besag (1974), Spatial interaction and the statistical analysis of lattice systems, JRSS B 36(2):192-236, doi:10.1111/j.2517-6161.1974.tb00999.x ; Besag, York and Mollie (1991), Annals of the Institute of Statistical Mathematics 43(1):1-20. doi:10.1007/BF00116466

Examples

Icarbm(matrix(c(0, 1, 0, 1, 0, 1, 0, 1, 0), 3, 3, byrow = TRUE))
#> $estimate
#> [1] -2.477782e-17
#> 
#> $precision
#>      [,1] [,2] [,3]
#> [1,]    1   -1    0
#> [2,]   -1    2   -1
#> [3,]    0   -1    1
#> 
#> $conditional_mean
#> [1] 0 0 0
#> 
#> $conditional_var
#> [1] 1.0 0.5 1.0
#> 
#> $pairwise_quadratic
#> [1] NaN
#> 
#> $log_density_kernel
#> [1] NaN
#> 
#> $smallest_eigenvalue
#> [1] -2.477782e-17
#> 
#> $mean_u
#> [1] NaN
#> 
#> $n
#> [1] 3
#> 
#> $method
#> [1] "u_i | u_-i ~ N(mean of neighbours, tau^2/n_i); Q = (D - W)/tau^2, Besag (1974)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"