Skip to contents

This function creates the a weighted ICAR precision matrix \(Q\). In \(Q\) each entry \(Q_{ij}\) is equal to the shared length of border between the two areas (and so zero if they are not adjacent). The diagonal elements \(Q_{ii}\) equal the total border of each area.

Usage

border_precision(sf)

Arguments

sf

A simple features object with some geometry.

Value

An ICAR precision matrix based upon sf.

Examples

border_precision(mw)
#> Error in sf::st_geometry(sf): object 'mw' not found