Create ICAR precision matrix from nb
.
nb_to_precision.Rd
Create ICAR precision matrix from nb
.
Arguments
- nb
A neighbourhood list object.
- W
A
length(nb)
bylength(nb)
symmetric weights matrix with zeros for non-neighbouring areas.- return_sparse
Should the matrix returned be of class
sparseMatrix
?- scale_precision
Should the matrix returned be scaled using
scale_gmrf_precision
?
Examples
nb <- sf_to_nb(mw)
#> Error in .class1(object): object 'mw' not found
nb_to_precision(nb)
#> Error in nb_to_precision(nb): object 'nb' not found