example(NY_data)
W <- as(as_dsTMatrix_listw(listw_NY), "dsCMatrix")
I <- as(as_dgCMatrix_I(dim(W)[1]), "dtCMatrix")
IrW <- (I - 0.1 * W)
CHOL <- chol(IrW)
sum(2*log(diag(CHOL)))
sum(log(1 - 0.1 * eigenw(listw_NY)))
Run the code above in your browser using DataLab