asMatrixCsrListw: Convert spatial weights list to CSR matrix form
Description
asMatrixCsrListw creates a matrix.csr from a listw object, asMatrixCsrIrW is a helper function used in fitting SAR models and elsewhere to make a (I - rho W) matrix.csr object from W; asListwMatrixCsr performs the reverse conversion from matrix.csr to listw object.
if TRUE assign zero to the lagged value of zones without
neighbours, if FALSE (default) assume no cases of no neighbours - if they are in fact present, asMatrixCsrListw() will terminate with an error
W
a matrix.csr object created using asMatrixCsrListw from a listw object
rho
spatial regression coefficient
n
length of diagonal for identity matrix
mcsr
a matrix.csr object
Value
asMatrixCsrListw and asMatrixCsrIrW return matrix.csr objects; asListwMatrixCsr returns a listw object