asMatrixCsrListw {spdep} | R Documentation |
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.
asMatrixCsrListw(listw, zero.policy=FALSE) asMatrixCsrIrW(W, rho) asMatrixCsrI(n) asListwMatrixCsr(mcsr)
listw |
a listw object created for example by nb2listw |
zero.policy |
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 |
asMatrixCsrListw
and asMatrixCsrIrW
return matrix.csr
objects; asListwMatrixCsr
returns a listw
object
Roger Bivand Roger.Bivand@nhh.no
## Not run: require(SparseM) data(oldcol) COL.W <- nb2listw(COL.nb, style="W") COL.W image(asMatrixCsrListw(COL.W)) ## End(Not run)