as_dgRMatrix_listw

0th

Percentile

Interface between Matrix class objects and weights lists

Interface between Matrix class objects and weights lists

Keywords
spatial
Usage
as_dgRMatrix_listw(listw) as_dsTMatrix_listw(listw) as_dsCMatrix_I(n) as_dsCMatrix_IrW(W, rho) Jacobian_W(W, rho)
Arguments
listw
a listw object created for example by nb2listw
W
a dsTMatrix object created using as_dsTMatrix_listw from a symmetric listw object
rho
spatial regression coefficient
n
length of diagonal for identity matrix
Value

Matrix package class objects

Aliases
  • as_dgRMatrix_listw
  • as_dsTMatrix_listw
  • as_dsCMatrix_I
  • as_dsCMatrix_IrW
  • Jacobian_W
  • coerce,listw,CsparseMatrix-method
  • coerce,listw,RsparseMatrix-method
  • coerce,listw,symmetricMatrix-method
Examples
example(NY_data)
W_C <- as(listw_NY, "CsparseMatrix")
W_R <- as(listw_NY, "RsparseMatrix")
W_S <- as(listw_NY, "symmetricMatrix")
n <- nrow(W_S)
I <- Diagonal(n)
rho <- 0.1
c(determinant(I - rho * W_S, logarithm=TRUE)$modulus)
sum(log(1 - rho * eigenw(listw_NY)))
nW <- - W_S
nChol <- Cholesky(nW, Imult=8)
n * log(rho) + (2 * c(determinant(update(nChol, nW, 1/rho))$modulus))
Documentation reproduced from package spdep, version 0.6-9, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.