Learn R Programming

stocc (version 1.31)

icar.Q: Creates the inverse covariance matrix for an intrinsic conditionally autoregressive spatial model.

Description

This function creates the ICAR precision matrices used in the spatial models

Usage

icar.Q(xy, threshold, rho = 1, fun = FALSE)

Arguments

xy

An n x 2 matrix of spatial coordinates

threshold

Distance threshold for neighborhood definition

rho

The autoregressive parameter. Defaults to 1, which is the Intrinsic Conditionally AutoRegressive model (ICAR)

fun

If TRUE this function returns a function of rho that generates the precision matrix of a ICAR process

Value

An n x n matrix

Details

Constructs the inverse covariance matrix (aside from scaling) for the ICAR model